diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-17 11:29:08 +0300 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-17 11:29:08 +0300 |
commit | 3f165fa5b3b38fa4b321be94a97f06927f636fb1 (patch) | |
tree | d5e2d1045e714823c2e9a3ef912dcafeffcc9ebd /libbb/signals.c | |
parent | 8e2cfec1cdf34068f2378aae9fe8f5ec0f821e21 (diff) |
libbb: introduce and use sigprocmask_allsigs and sigaction_set.
libbb: rename sig_pause to wait_for_any_sig.
Diffstat (limited to 'libbb/signals.c')
-rw-r--r-- | libbb/signals.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/libbb/signals.c b/libbb/signals.c index 719beab63..685c55230 100644 --- a/libbb/signals.c +++ b/libbb/signals.c @@ -17,6 +17,13 @@ int sigaction_set(int signum, const struct sigaction *act) return sigaction(signum, act, NULL); } +int sigprocmask_allsigs(int how) +{ + sigset_t set; + sigfillset(&set); + return sigprocmask(how, &set, NULL); +} + void bb_signals(int sigs, void (*f)(int)) { int sig_no = 0; @@ -69,16 +76,7 @@ void sig_unblock(int sig) sigprocmask(SIG_UNBLOCK, &ss, NULL); } -#if 0 -void sig_blocknone(void) -{ - sigset_t ss; - sigemptyset(&ss); - sigprocmask(SIG_SETMASK, &ss, NULL); -} -#endif - -void sig_pause(void) +void wait_for_any_sig(void) { sigset_t ss; sigemptyset(&ss); |