aboutsummaryrefslogtreecommitdiff
path: root/loginutils/login.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-02-24 13:36:01 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-02-24 13:36:01 +0000
commit400d8bb45ee25ce226bb343a3dfaab84e6d3a8e1 (patch)
treeaa3cdc9a663f1ac2467803fc215899d86ed1db74 /loginutils/login.c
parentd553faf5a53cf9d72e16fc789451a92a797f1b70 (diff)
downloadbusybox-400d8bb45ee25ce226bb343a3dfaab84e6d3a8e1.tar.gz
less,klogd,syslogd,nc,tcpudp: exit on signal by killing itself, not exit(1)
*: minor shrink
Diffstat (limited to 'loginutils/login.c')
-rw-r--r--loginutils/login.c5
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)
* arrive here when their connection is broken.
* We don't want to block here */
ndelay_on(1);
- ndelay_on(2);
printf("\r\nLogin timed out after %d seconds\r\n", TIMEOUT);
+ fflush(stdout);
/* unix API is brain damaged regarding O_NONBLOCK,
* we should undo it, or else we can affect other processes */
ndelay_off(1);
- ndelay_off(2);
- exit(EXIT_SUCCESS);
+ _exit(EXIT_SUCCESS);
}
int login_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;