From 7f97f0fee46ae167c27c5be21ee0caddacbc6bf9 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 3 Sep 2010 01:41:40 +0200 Subject: [PATCH] service: properly handle if the main process is down and we wait for the cgroup to die, too --- src/service.c | 7 +++++++ 1 file changed, 7 insertions(+) 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: ; } -- 2.39.5