]> err.no Git - systemd/commitdiff
service: properly handle if the main process is down and we wait for the cgroup to...
authorLennart Poettering <lennart@poettering.net>
Thu, 2 Sep 2010 23:41:40 +0000 (01:41 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 2 Sep 2010 23:42:57 +0000 (01:42 +0200)
src/service.c

index fabb71ca978f23453aac4c4bec7cad1db28a7643..94f2f37afc1c15ce74da44ccac4b4ed71bfed7f7 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:
                 ;
         }