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:
Joachim Nilsson
2020-04-11 21:55:40 +02:00
parent 25c194ef93
commit ff24ee3553
+3
View File
@@ -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;