From 400d8bb45ee25ce226bb343a3dfaab84e6d3a8e1 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sun, 24 Feb 2008 13:36:01 +0000 Subject: less,klogd,syslogd,nc,tcpudp: exit on signal by killing itself, not exit(1) *: minor shrink --- loginutils/login.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'loginutils/login.c') 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; -- cgit v1.2.3