mirror of
https://github.com/troglobit/finit.git
synced 2026-10-17 10:49:34 +00:00
Display 'run' stanza progress only when they've completed
This is a follow-up to 4701ede.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
afe0488bf2
commit
a46a33238d
1 file changed
+8
-6
+8
-6
@@ -836,7 +836,7 @@ static int service_start(svc_t *svc)
|
||||
|
||||
fail:
|
||||
sigprocmask(SIG_SETMASK, &omask, NULL);
|
||||
if (do_progress)
|
||||
if (do_progress && !run_block_pid)
|
||||
print_result(result);
|
||||
|
||||
return result;
|
||||
@@ -1847,11 +1847,6 @@ void service_monitor(pid_t lost, int status)
|
||||
return;
|
||||
}
|
||||
|
||||
if (lost == run_block_pid) {
|
||||
svc_mark_clean(svc); /* done, regardless of exit status */
|
||||
run_block_pid = 0;
|
||||
}
|
||||
|
||||
switch (svc->state) {
|
||||
case SVC_CLEANUP_STATE:
|
||||
case SVC_SETUP_STATE:
|
||||
@@ -1900,6 +1895,13 @@ done:
|
||||
/* No longer running, update books. */
|
||||
svc->start_time = svc->pid = 0;
|
||||
cont:
|
||||
if (lost == run_block_pid) {
|
||||
svc_mark_clean(svc); /* done, regardless of exit status */
|
||||
run_block_pid = 0;
|
||||
if (svc->desc[0])
|
||||
print_result(WIFEXITED(status) ? WEXITSTATUS(status) : 1);
|
||||
}
|
||||
|
||||
if (!service_step(svc)) {
|
||||
/* Clean out any bootstrap tasks, they've had their time in the sun. */
|
||||
if (svc_clean_bootstrap(svc))
|
||||
|
||||
Reference in new issue
Block a user