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://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f97f0fee46ae167c27c5be21ee0caddacbc6bf9;p=systemd 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 fabb71ca..94f2f37a 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: ; }