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 /shell | |
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 'shell')
-rw-r--r-- | shell/hush.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/shell/hush.c b/shell/hush.c index 820fd888d..d9ef2390e 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -808,12 +808,7 @@ static void sigexit(int sig) | |||
808 | if (sig <= 0) | 808 | if (sig <= 0) |
809 | _exit(- sig); | 809 | _exit(- sig); |
810 | 810 | ||
811 | /* Enable only this sig and kill ourself with it */ | 811 | kill_myself_with_sig(sig); /* does not return */ |
812 | signal(sig, SIG_DFL); | ||
813 | sigdelset(&block_all, sig); | ||
814 | sigprocmask(SIG_SETMASK, &block_all, NULL); | ||
815 | raise(sig); | ||
816 | _exit(1); /* Should not reach it */ | ||
817 | } | 812 | } |
818 | 813 | ||
819 | /* Restores tty foreground process group, and exits. */ | 814 | /* Restores tty foreground process group, and exits. */ |