mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
service_monitor(): cancel any pending SIGKILL timers
As soon as we collect a PID we should cancel any outstanding timer actions. Because we may very soon svc_del() it ... Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -654,6 +654,9 @@ static void service_cleanup(svc_t *svc)
|
||||
logit(LOG_CRIT, "Failed removing service %s pidfile %s",
|
||||
basename(svc->cmd), fn);
|
||||
|
||||
/* PID collected, cancel any pending SIGKILL */
|
||||
service_timeout_cancel(svc);
|
||||
|
||||
/* No longer running, update books. */
|
||||
if (svc_is_tty(svc) && svc->pid > 1)
|
||||
utmp_set_dead(svc->pid); /* Set DEAD_PROCESS UTMP entry */
|
||||
|
||||
Reference in New Issue
Block a user