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 <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2015-06-17 13:36:36 +02:00
parent 7b894fcf52
commit 66f472bb05
+10 -3
View File
@@ -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;