diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2012-09-27 13:20:34 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-09-27 13:20:34 +0200 |
commit | c4f2d997a40025657de9a9cbf3c963b080d702fb (patch) | |
tree | a62dfab676c5a0f780e5e915e4fa3da0b60bda46 /libbb | |
parent | 73a19908975948154d1a07c3550592059238e9ef (diff) |
libbb: correctness/size tweaks in signal-related helpers
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/signals.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libbb/signals.c b/libbb/signals.c index cdc37b1ef..56512473a 100644 --- a/libbb/signals.c +++ b/libbb/signals.c @@ -39,7 +39,7 @@ void FAST_FUNC bb_signals(int sigs, void (*f)(int)) while (sigs) { if (sigs & bit) { - sigs &= ~bit; + sigs -= bit; signal(sig_no, f); } sig_no++; @@ -60,7 +60,7 @@ void FAST_FUNC bb_signals_recursive_norestart(int sigs, void (*f)(int)) while (sigs) { if (sigs & bit) { - sigs &= ~bit; + sigs -= bit; sigaction_set(sig_no, &sa); } sig_no++; @@ -97,7 +97,7 @@ void FAST_FUNC kill_myself_with_sig(int sig) signal(sig, SIG_DFL); sig_unblock(sig); raise(sig); - _exit(EXIT_FAILURE); /* Should not reach it */ + _exit(sig | 128); /* Should not reach it */ } void FAST_FUNC signal_SA_RESTART_empty_mask(int sig, void (*handler)(int)) |