summaryrefslogtreecommitdiff
path: root/libbb/signals.c
diff options
context:
space:
mode:
authorDenis Vlasenko2008-03-17 08:29:08 +0000
committerDenis Vlasenko2008-03-17 08:29:08 +0000
commit3f165fa5b3b38fa4b321be94a97f06927f636fb1 (patch)
treed5e2d1045e714823c2e9a3ef912dcafeffcc9ebd /libbb/signals.c
parent8e2cfec1cdf34068f2378aae9fe8f5ec0f821e21 (diff)
downloadbusybox-3f165fa5b3b38fa4b321be94a97f06927f636fb1.zip
busybox-3f165fa5b3b38fa4b321be94a97f06927f636fb1.tar.gz
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.c18
1 files changed, 8 insertions, 10 deletions
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);