summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-09-01 01:33:12 +0200
committerLennart Poettering <lennart@poettering.net>2010-09-01 01:33:12 +0200
commit28708d8aa0da5ac1c568b08b1e1c951f69cd4e82 (patch)
tree0757bcec907d69ec974abdc852fdd9677ccd328d /src
parentf5a501146a426d95daa6d67d832b2ab339befbae (diff)
service: recheck PID status when a cgroup runs empty
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 2fec3ea8c..fabb71ca9 100644
--- a/src/service.c
+++ b/src/service.c
@@ -2572,6 +2572,13 @@ static void service_cgroup_notify_event(Unit *u) {
service_enter_running(s, true);
break;
+ case SERVICE_STOP_SIGTERM:
+ case SERVICE_STOP_SIGKILL:
+ if (main_pid_good(s) <= 0 && !control_pid_good(s))
+ service_enter_stop_post(s, true);
+
+ break;
+
default:
;
}