mirror of
https://github.com/troglobit/finit.git
synced 2026-11-19 19:40:50 +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:
|
fail:
|
||||||
sigprocmask(SIG_SETMASK, &omask, NULL);
|
sigprocmask(SIG_SETMASK, &omask, NULL);
|
||||||
if (do_progress)
|
if (do_progress && !run_block_pid)
|
||||||
print_result(result);
|
print_result(result);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@@ -1847,11 +1847,6 @@ void service_monitor(pid_t lost, int status)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lost == run_block_pid) {
|
|
||||||
svc_mark_clean(svc); /* done, regardless of exit status */
|
|
||||||
run_block_pid = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (svc->state) {
|
switch (svc->state) {
|
||||||
case SVC_CLEANUP_STATE:
|
case SVC_CLEANUP_STATE:
|
||||||
case SVC_SETUP_STATE:
|
case SVC_SETUP_STATE:
|
||||||
@@ -1900,6 +1895,13 @@ done:
|
|||||||
/* No longer running, update books. */
|
/* No longer running, update books. */
|
||||||
svc->start_time = svc->pid = 0;
|
svc->start_time = svc->pid = 0;
|
||||||
cont:
|
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)) {
|
if (!service_step(svc)) {
|
||||||
/* Clean out any bootstrap tasks, they've had their time in the sun. */
|
/* Clean out any bootstrap tasks, they've had their time in the sun. */
|
||||||
if (svc_clean_bootstrap(svc))
|
if (svc_clean_bootstrap(svc))
|
||||||
|
|||||||
Reference in new issue
Block a user