mirror of
https://github.com/troglobit/finit.git
synced 2026-10-02 05:52:48 +07: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:
+2
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user