aboutsummaryrefslogtreecommitdiff
path: root/initd
diff options
context:
space:
mode:
authorDavid Oberhollenzer <goliath@infraroot.at>2020-05-09 02:12:17 +0200
committerDavid Oberhollenzer <goliath@infraroot.at>2020-05-09 02:13:09 +0200
commit86b9683ec5bc70c875cc0dfc87dbbd61c02682ea (patch)
tree41b7c99e2d9de42f782b09048db2809a3f487a09 /initd
parent1616a62a57c427b1d50ffa5a08bf8899508ee0ea (diff)
Fix accidental release of "waiting" state
If a singleshot service terminates, don't change the "waiting" sate. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
Diffstat (limited to 'initd')
-rw-r--r--initd/supervisor.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/initd/supervisor.c b/initd/supervisor.c
index 3372e7f..1a131ac 100644
--- a/initd/supervisor.c
+++ b/initd/supervisor.c
@@ -105,9 +105,11 @@ void supervisor_handle_exited(pid_t pid, int status)
print_status(svc->desc, rt->state);
- waiting = false;
- if (svc->type == SVC_ONCE)
+ if (svc->type == SVC_ONCE) {
singleshot -= 1;
+ } else if (svc->type == SVC_WAIT) {
+ waiting = false;
+ }
check_target_completion();
}