From: Lennart Poettering Date: Thu, 2 Sep 2010 23:41:40 +0000 (+0200) Subject: service: properly handle if the main process is down and we wait for the cgroup to... X-Git-Tag: v9~9 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=7f97f0fee46ae167c27c5be21ee0caddacbc6bf9 service: properly handle if the main process is down and we wait for the cgroup to die, too --- diff --git a/src/service.c b/src/service.c index fabb71ca9..94f2f37af 100644 --- a/src/service.c +++ b/src/service.c @@ -2579,6 +2579,13 @@ static void service_cgroup_notify_event(Unit *u) { break; + case SERVICE_FINAL_SIGTERM: + case SERVICE_FINAL_SIGKILL: + if (main_pid_good(s) <= 0 && !control_pid_good(s)) + service_enter_dead(s, true, true); + + break; + default: ; }