service_stop(): Also stop any pending restart timers

In service_stop() we call svc_del() which, as of Finit v3.1, free():s
the svc_t, so we don't want any lingering restart timers to wake up
after free() and start dereferencing the svc_t.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2018-01-19 16:07:22 +01:00
parent 3c52118a8e
commit abb928f60b
+2 -1
View File
@@ -429,8 +429,9 @@ static int service_stop(svc_t *svc)
if (do_progress)
print_result(0);
return 0;
}
} else
#endif
service_timeout_cancel(svc);
if (svc->pid <= 1) {
_d("Bad PID %d for %s, SIGTERM", svc->pid, svc->cmd);