From 66f472bb0594cb0bd59da16ca009e2df554de300 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Tue, 16 Jun 2015 15:04:27 +0200 Subject: [PATCH] service_start(): Make sure to collect the run child. Fix side effect with run stanza children not being collected if finit is not run in verbose mode. Regression introduced in release cycle. Signed-off-by: Joachim Nilsson --- service.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/service.c b/service.c index 4e7d63d1..17e22dab 100644 --- a/service.c +++ b/service.c @@ -285,11 +285,18 @@ int service_start(svc_t *svc) if (svc_is_inetd(svc)) { if (svc->inetd.type == SOCK_STREAM) close(sd); - } else if (verbose) { + } else { + int result; + if (SVC_TYPE_RUN == svc->type) - print_result(WEXITSTATUS(complete(svc->cmd, pid))); + result = WEXITSTATUS(complete(svc->cmd, pid)); else if (!respawn) - print_result(svc->pid > 1 ? 0 : 1); + result = svc->pid > 1 ? 0 : 1; + else + result = 0; + + if (verbose) + print_result(result); } return 0;