diff options
author | David Oberhollenzer <goliath@infraroot.at> | 2020-05-13 17:13:32 +0200 |
---|---|---|
committer | David Oberhollenzer <goliath@infraroot.at> | 2020-05-13 17:14:45 +0200 |
commit | 3db3b82a3081f6db3cbee8926db19c1c072cc7d5 (patch) | |
tree | 725c14982b8d0ef2451c249c0ee8b55da27fba2e /initd/supervisor.c | |
parent | 9084f3862973aa5eccfafe51c6682a6aef123d4d (diff) |
Cleanup: Remove SIGCHLD handler from initd
Instead use wait() in the main loop. This way, the supervisor
functions (except set target) are no longer called from signal
context and can be simplified a little.
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
Diffstat (limited to 'initd/supervisor.c')
-rw-r--r-- | initd/supervisor.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/initd/supervisor.c b/initd/supervisor.c index 43900a5..5849b9c 100644 --- a/initd/supervisor.c +++ b/initd/supervisor.c @@ -180,23 +180,18 @@ out: bool supervisor_process_queues(void) { svc_run_data_t *rt; - sigset_t old_mask; service_t *svc; size_t count; - bool ret = false; - - cli(&old_mask); if (waiting) - goto out_unblock; + return false; count = queue_count[target]; if (queue_idx >= count) - goto out_unblock; + return false; rt = rt_data + queue_start[target] + queue_idx++; svc = rt->svc; - ret = true; if (svc->flags & SVC_FLAG_HAS_EXEC) { rt->pid = runsvc(rt->svc); @@ -222,7 +217,5 @@ bool supervisor_process_queues(void) print_status(svc->desc, rt->state); check_target_completion(); -out_unblock: - sti(&old_mask); - return ret; + return true; } |