From b8e6954c4648cf571e534a768aa99b2a312dd38c Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Thu, 1 Mar 2018 23:47:24 +0100 Subject: [PATCH] Issue #96: Remember to track run commands having run once as well All service/task commands are tracked by the state machine, but run commands are a bit special since they must run in sequence. Hence, we must increment their 'once' counter in service_start() instead. This should fix the issue mentioned in #96 "took a long time before the next line" -- because Finit was waiting for udevadm to reach a once count > 0, which we didn't increment. Signed-off-by: Joachim Nilsson --- src/service.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/service.c b/src/service.c index ae22c277..187bd962 100644 --- a/src/service.c +++ b/src/service.c @@ -355,6 +355,7 @@ static int service_start(svc_t *svc) result = WEXITSTATUS(complete(svc->cmd, pid)); if (!svc_clean_bootstrap(svc)) { svc->start_time = svc->pid = 0; + svc->once++; svc_set_state(svc, SVC_STOPPING_STATE); } }