aboutsummaryrefslogtreecommitdiff
path: root/initd/supervisor.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <goliath@infraroot.at>2020-05-13 17:08:54 +0200
committerDavid Oberhollenzer <goliath@infraroot.at>2020-05-13 17:08:54 +0200
commit9084f3862973aa5eccfafe51c6682a6aef123d4d (patch)
treefcd0810e34a1c9b97aa796ebc114fb605f916162 /initd/supervisor.c
parentdd0007f9dcb850806cb62ecc705c35789e12f175 (diff)
Add utility functions for clearing/setting signal mask
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
Diffstat (limited to 'initd/supervisor.c')
-rw-r--r--initd/supervisor.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/initd/supervisor.c b/initd/supervisor.c
index 1a131ac..43900a5 100644
--- a/initd/supervisor.c
+++ b/initd/supervisor.c
@@ -179,14 +179,13 @@ out:
bool supervisor_process_queues(void)
{
- sigset_t mask, old_mask;
svc_run_data_t *rt;
+ sigset_t old_mask;
service_t *svc;
size_t count;
bool ret = false;
- sigfillset(&mask);
- sigprocmask(SIG_SETMASK, &mask, &old_mask);
+ cli(&old_mask);
if (waiting)
goto out_unblock;
@@ -224,6 +223,6 @@ bool supervisor_process_queues(void)
print_status(svc->desc, rt->state);
check_target_completion();
out_unblock:
- sigprocmask(SIG_SETMASK, &old_mask, NULL);
+ sti(&old_mask);
return ret;
}