From 3f165fa5b3b38fa4b321be94a97f06927f636fb1 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 17 Mar 2008 08:29:08 +0000 Subject: libbb: introduce and use sigprocmask_allsigs and sigaction_set. libbb: rename sig_pause to wait_for_any_sig. --- libbb/signals.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'libbb') diff --git a/libbb/signals.c b/libbb/signals.c index 719beab..685c552 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); -- cgit v1.1