mirror of
https://github.com/troglobit/finit.git
synced 2026-10-06 07:43:43 +07:00
Terminate children in the same process group when monitored PID dies
Really kill them, our monitored process may be about to restart, so we don't want any unintended side effects from lingering children in prior instances. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+1
-1
@@ -1172,7 +1172,7 @@ void service_monitor(pid_t lost, int status)
|
||||
}
|
||||
|
||||
/* Terminate any children in the same proess group, e.g. logit */
|
||||
kill(-svc->pid, SIGTERM);
|
||||
kill(-svc->pid, SIGKILL);
|
||||
|
||||
/* No longer running, update books. */
|
||||
svc->start_time = svc->pid = 0;
|
||||
|
||||
Reference in New Issue
Block a user