mirror of
https://github.com/troglobit/finit.git
synced 2026-10-24 11:54:36 +00:00
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:
1 parent
7b894fcf52
commit
66f472bb05
1 file changed
+10
-3
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user