mirror of
https://github.com/troglobit/finit.git
synced 2026-10-12 10:12: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:
+2
-2
@@ -915,12 +915,12 @@ static void service_kill(svc_t *svc)
|
||||
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);
|
||||
if (runlevel != 1)
|
||||
print_desc("Killing ", svc->desc);
|
||||
|
||||
kill(-svc->pid, SIGKILL);
|
||||
kill(svc->pid, SIGKILL);
|
||||
|
||||
/* Let SIGKILLs stand out, show result as [WARN] */
|
||||
if (runlevel != 1)
|
||||
|
||||
Reference in New Issue
Block a user