diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-24 13:36:01 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-24 13:36:01 +0000 |
commit | 400d8bb45ee25ce226bb343a3dfaab84e6d3a8e1 (patch) | |
tree | aa3cdc9a663f1ac2467803fc215899d86ed1db74 /loginutils | |
parent | d553faf5a53cf9d72e16fc789451a92a797f1b70 (diff) | |
download | busybox-w32-400d8bb45ee25ce226bb343a3dfaab84e6d3a8e1.tar.gz busybox-w32-400d8bb45ee25ce226bb343a3dfaab84e6d3a8e1.tar.bz2 busybox-w32-400d8bb45ee25ce226bb343a3dfaab84e6d3a8e1.zip |
less,klogd,syslogd,nc,tcpudp: exit on signal by killing itself, not exit(1)
*: minor shrink
Diffstat (limited to 'loginutils')
-rw-r--r-- | loginutils/login.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/loginutils/login.c b/loginutils/login.c index a5b6369ff..bc437bb6b 100644 --- a/loginutils/login.c +++ b/loginutils/login.c | |||
@@ -214,13 +214,12 @@ static void alarm_handler(int sig ATTRIBUTE_UNUSED) | |||
214 | * arrive here when their connection is broken. | 214 | * arrive here when their connection is broken. |
215 | * We don't want to block here */ | 215 | * We don't want to block here */ |
216 | ndelay_on(1); | 216 | ndelay_on(1); |
217 | ndelay_on(2); | ||
218 | printf("\r\nLogin timed out after %d seconds\r\n", TIMEOUT); | 217 | printf("\r\nLogin timed out after %d seconds\r\n", TIMEOUT); |
218 | fflush(stdout); | ||
219 | /* unix API is brain damaged regarding O_NONBLOCK, | 219 | /* unix API is brain damaged regarding O_NONBLOCK, |
220 | * we should undo it, or else we can affect other processes */ | 220 | * we should undo it, or else we can affect other processes */ |
221 | ndelay_off(1); | 221 | ndelay_off(1); |
222 | ndelay_off(2); | 222 | _exit(EXIT_SUCCESS); |
223 | exit(EXIT_SUCCESS); | ||
224 | } | 223 | } |
225 | 224 | ||
226 | int login_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 225 | int login_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |