]> err.no Git - systemd/commitdiff
service: wait for process exit only if we actually killed somebody
authorLennart Poettering <lennart@poettering.net>
Tue, 31 Aug 2010 22:48:05 +0000 (00:48 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 31 Aug 2010 22:48:05 +0000 (00:48 +0200)
src/service.c

index 85dd5d4175536d3f87f96fa917180932b574f3ca..2fec3ea8c9168b7fa290b71e02042ec607878d95 100644 (file)
@@ -1620,7 +1620,7 @@ static void service_enter_signal(Service *s, ServiceState state, bool success) {
                         if ((r = cgroup_bonding_kill_list(s->meta.cgroup_bondings, sig, pid_set)) < 0) {
                                 if (r != -EAGAIN && r != -ESRCH && r != -ENOENT)
                                         log_warning("Failed to kill control group: %s", strerror(-r));
-                        } else
+                        } else if (r > 0)
                                 wait_for_exit = true;
 
                         set_free(pid_set);