mirror of
https://github.com/troglobit/finit.git
synced 2026-11-02 13:20:32 +00:00
Revert last part of 91a9c83, fallback SIGKILL when stopping services
When a service is stopped, but does not respond to the default SIGTERM,
a fallback kicks in after 3 seconds (default) to send SIGKILL. Since
91a9c83 (v3.2-rc2) this has however not worked since the signal was
only sent to the process group.
It is the job of service_monitor(), when it reaps the process leader,
to forward the signal to the process group.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 file changed
+2
-2
+2
-2
@@ -915,12 +915,12 @@ static void service_kill(svc_t *svc)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
dbg("%s: Sending SIGKILL to process group %d", nm, svc->pid);
|
dbg("%s: Sending SIGKILL to process %d", nm, svc->pid);
|
||||||
logit(LOG_CONSOLE | LOG_NOTICE, "Stopping %s[%d], sending SIGKILL ...", id, svc->pid);
|
logit(LOG_CONSOLE | LOG_NOTICE, "Stopping %s[%d], sending SIGKILL ...", id, svc->pid);
|
||||||
if (runlevel != 1)
|
if (runlevel != 1)
|
||||||
print_desc("Killing ", svc->desc);
|
print_desc("Killing ", svc->desc);
|
||||||
|
|
||||||
kill(-svc->pid, SIGKILL);
|
kill(svc->pid, SIGKILL);
|
||||||
|
|
||||||
/* Let SIGKILLs stand out, show result as [WARN] */
|
/* Let SIGKILLs stand out, show result as [WARN] */
|
||||||
if (runlevel != 1)
|
if (runlevel != 1)
|
||||||
|
|||||||
Reference in new issue
Block a user