mirror of
https://github.com/troglobit/finit.git
synced 2026-11-08 16:11:10 +00:00
Prevent 100% CPU, allow bootstrap tasks to fully complete
When collecting a bootstrap task we need to allow its state machine to complete before cleaning them out. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
5551324291
commit
40fc95047d
1 file changed
+4
-6
+4
-6
@@ -718,11 +718,6 @@ void service_monitor(pid_t lost)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (svc_clean_bootstrap(svc)) {
|
|
||||||
_d("collected bootstrap task %s(%d), removing.", svc->cmd, lost);
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
_d("collected %s(%d)", svc->cmd, lost);
|
_d("collected %s(%d)", svc->cmd, lost);
|
||||||
|
|
||||||
/* Try removing PID file (in case service does not clean up after itself) */
|
/* Try removing PID file (in case service does not clean up after itself) */
|
||||||
@@ -736,7 +731,10 @@ void service_monitor(pid_t lost)
|
|||||||
svc->pid = 0;
|
svc->pid = 0;
|
||||||
service_step(svc);
|
service_step(svc);
|
||||||
|
|
||||||
done:
|
/* Clean out any bootstrap tasks, they've had their time in the sun. */
|
||||||
|
if (svc_clean_bootstrap(svc))
|
||||||
|
_d("collected bootstrap task %s(%d), removing.", svc->cmd, lost);
|
||||||
|
|
||||||
sm_step(&sm);
|
sm_step(&sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user