aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbb/signals.c6
-rw-r--r--procps/top.c2
2 files changed, 4 insertions, 4 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))
39 39
40 while (sigs) { 40 while (sigs) {
41 if (sigs & bit) { 41 if (sigs & bit) {
42 sigs &= ~bit; 42 sigs -= bit;
43 signal(sig_no, f); 43 signal(sig_no, f);
44 } 44 }
45 sig_no++; 45 sig_no++;
@@ -60,7 +60,7 @@ void FAST_FUNC bb_signals_recursive_norestart(int sigs, void (*f)(int))
60 60
61 while (sigs) { 61 while (sigs) {
62 if (sigs & bit) { 62 if (sigs & bit) {
63 sigs &= ~bit; 63 sigs -= bit;
64 sigaction_set(sig_no, &sa); 64 sigaction_set(sig_no, &sa);
65 } 65 }
66 sig_no++; 66 sig_no++;
@@ -97,7 +97,7 @@ void FAST_FUNC kill_myself_with_sig(int sig)
97 signal(sig, SIG_DFL); 97 signal(sig, SIG_DFL);
98 sig_unblock(sig); 98 sig_unblock(sig);
99 raise(sig); 99 raise(sig);
100 _exit(EXIT_FAILURE); /* Should not reach it */ 100 _exit(sig | 128); /* Should not reach it */
101} 101}
102 102
103void FAST_FUNC signal_SA_RESTART_empty_mask(int sig, void (*handler)(int)) 103void FAST_FUNC signal_SA_RESTART_empty_mask(int sig, void (*handler)(int))
diff --git a/procps/top.c b/procps/top.c
index 1977fcafc..b08444a76 100644
--- a/procps/top.c
+++ b/procps/top.c
@@ -727,7 +727,7 @@ static void reset_term(void)
727 } 727 }
728} 728}
729 729
730static void sig_catcher(int sig UNUSED_PARAM) 730static void sig_catcher(int sig)
731{ 731{
732 reset_term(); 732 reset_term();
733 kill_myself_with_sig(sig); 733 kill_myself_with_sig(sig);