mirror of
https://github.com/troglobit/finit.git
synced 2026-11-01 13:10:32 +00:00
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:
1 parent
3c52118a8e
commit
abb928f60b
1 file changed
+2
-1
+2
-1
@@ -429,8 +429,9 @@ static int service_stop(svc_t *svc)
|
|||||||
if (do_progress)
|
if (do_progress)
|
||||||
print_result(0);
|
print_result(0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
service_timeout_cancel(svc);
|
||||||
|
|
||||||
if (svc->pid <= 1) {
|
if (svc->pid <= 1) {
|
||||||
_d("Bad PID %d for %s, SIGTERM", svc->pid, svc->cmd);
|
_d("Bad PID %d for %s, SIGTERM", svc->pid, svc->cmd);
|
||||||
|
|||||||
Reference in new issue
Block a user