Skip to content

Commit b695b46

Browse files
committed
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 <[email protected]>
1 parent 0e61ed7 commit b695b46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/service.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -915,12 +915,12 @@ static void service_kill(svc_t *svc)
915915
return;
916916
}
917917

918-
dbg("%s: Sending SIGKILL to process group %d", nm, svc->pid);
918+
dbg("%s: Sending SIGKILL to process %d", nm, svc->pid);
919919
logit(LOG_CONSOLE | LOG_NOTICE, "Stopping %s[%d], sending SIGKILL ...", id, svc->pid);
920920
if (runlevel != 1)
921921
print_desc("Killing ", svc->desc);
922922

923-
kill(-svc->pid, SIGKILL);
923+
kill(svc->pid, SIGKILL);
924924

925925
/* Let SIGKILLs stand out, show result as [WARN] */
926926
if (runlevel != 1)

0 commit comments

Comments
 (0)