mirror of
https://github.com/troglobit/finit.git
synced 2026-10-03 06:23:11 +07:00
Fix #124: reap all children in same process group of dying parent
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -1162,6 +1162,9 @@ void service_monitor(pid_t lost, int status)
|
||||
svc->started = 0;
|
||||
}
|
||||
|
||||
/* Terminate any children in the same proess group, e.g. logit */
|
||||
kill(-svc->pid, SIGTERM);
|
||||
|
||||
/* No longer running, update books. */
|
||||
svc->start_time = svc->pid = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user