mirror of
https://github.com/troglobit/finit.git
synced 2026-10-03 06:23:11 +07: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:
@@ -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