summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-09-03 01:41:40 +0200
committerLennart Poettering <lennart@poettering.net>2010-09-03 01:42:57 +0200
commit7f97f0fee46ae167c27c5be21ee0caddacbc6bf9 (patch)
tree1df2ce4f5206337766896c47161e0bbbf7703771 /src
parent5d452f9ceceabf2bf69acb58e69a41fb41011e37 (diff)
service: properly handle if the main process is down and we wait for the cgroup to die, too
Diffstat (limited to 'src')
-rw-r--r--src/service.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/service.c b/src/service.c
index fabb71ca97..94f2f37afc 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:
;
}