From 86b9683ec5bc70c875cc0dfc87dbbd61c02682ea Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sat, 9 May 2020 02:12:17 +0200 Subject: Fix accidental release of "waiting" state If a singleshot service terminates, don't change the "waiting" sate. Signed-off-by: David Oberhollenzer --- initd/supervisor.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'initd') 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(); } -- cgit v1.2.3