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 --- shell/hush.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'shell') diff --git a/shell/hush.c b/shell/hush.c index 820fd88..d9ef239 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -808,12 +808,7 @@ static void sigexit(int sig) if (sig <= 0) _exit(- sig); - /* Enable only this sig and kill ourself with it */ - signal(sig, SIG_DFL); - sigdelset(&block_all, sig); - sigprocmask(SIG_SETMASK, &block_all, NULL); - raise(sig); - _exit(1); /* Should not reach it */ + kill_myself_with_sig(sig); /* does not return */ } /* Restores tty foreground process group, and exits. */ -- cgit v1.1