chiark / gitweb /
cgroup: make sure to properly send SIGCONT to all processes of a cgroup if that's...
[elogind.git] / src / shared / cgroup-util.c
index 4ce885601fef2c76e5a152352c966e07d8559a2f..e6ceb99454b8460408c64f9797b0ed884e04624c 100644 (file)
@@ -194,12 +194,12 @@ int cg_kill(const char *controller, const char *path, int sig, bool sigcont, boo
                         if (kill(pid, sig) < 0) {
                                 if (ret >= 0 && errno != ESRCH)
                                         ret = -errno;
-                        } else if (ret == 0) {
-
+                        } else {
                                 if (sigcont)
                                         kill(pid, SIGCONT);
 
-                                ret = 1;
+                                if (ret == 0)
+                                        ret = 1;
                         }
 
                         done = false;