mirror of
https://github.com/troglobit/finit.git
synced 2026-11-02 13:20:32 +00: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:
1 parent
12c3cb3dc0
commit
85a212ef93
1 file changed
+3
@@ -654,6 +654,9 @@ static void service_cleanup(svc_t *svc)
|
|||||||
logit(LOG_CRIT, "Failed removing service %s pidfile %s",
|
logit(LOG_CRIT, "Failed removing service %s pidfile %s",
|
||||||
basename(svc->cmd), fn);
|
basename(svc->cmd), fn);
|
||||||
|
|
||||||
|
/* PID collected, cancel any pending SIGKILL */
|
||||||
|
service_timeout_cancel(svc);
|
||||||
|
|
||||||
/* No longer running, update books. */
|
/* No longer running, update books. */
|
||||||
if (svc_is_tty(svc) && svc->pid > 1)
|
if (svc_is_tty(svc) && svc->pid > 1)
|
||||||
utmp_set_dead(svc->pid); /* Set DEAD_PROCESS UTMP entry */
|
utmp_set_dead(svc->pid); /* Set DEAD_PROCESS UTMP entry */
|
||||||
|
|||||||
Reference in new issue
Block a user