From 46cef811d6281d20229b66adf7dbd2e431a75a85 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Wed, 11 Oct 2017 23:01:49 +0200 Subject: [PATCH] Make sure to step state machine when collecting bootstrap tasks During the runlevel change from S --> 2 the state machine will pause, waiting to collect all S-only tasks/services, before continuing. When an S-only task/service is collected we therefore need to call the state machine again so that it can reassert all conditions properly. Signed-off-by: Joachim Nilsson --- src/service.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/service.c b/src/service.c index 6293e4e1..54731c8f 100644 --- a/src/service.c +++ b/src/service.c @@ -720,7 +720,7 @@ void service_monitor(pid_t lost) if (svc_clean_bootstrap(svc)) { _d("collected bootstrap task %s(%d), removing.", svc->cmd, lost); - return; + goto done; } _d("collected %s(%d)", svc->cmd, lost); @@ -736,6 +736,7 @@ void service_monitor(pid_t lost) svc->pid = 0; service_step(svc); +done: sm_step(&sm); }