chiark / gitweb /
service: properly handle if the main process is down and we wait for the cgroup to...
[elogind.git] / src / service.c
index fabb71c..94f2f37 100644 (file)
@@ -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:
                 ;
         }