diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/service.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/service.c b/src/core/service.c index 98aa9b9292..72b579a32c 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -3492,6 +3492,12 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) { break; case SERVICE_STOP_POST: + + if (control_pid_good(s) <= 0) + service_enter_signal(s, SERVICE_FINAL_SIGTERM, f); + + break; + case SERVICE_FINAL_SIGTERM: case SERVICE_FINAL_SIGKILL: @@ -3641,6 +3647,10 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) { break; case SERVICE_STOP_POST: + if (main_pid_good(s) <= 0) + service_enter_signal(s, SERVICE_FINAL_SIGTERM, f); + break; + case SERVICE_FINAL_SIGTERM: case SERVICE_FINAL_SIGKILL: if (main_pid_good(s) <= 0) |