]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
cgroup: suppress sending follow-up SIGCONT after sending SIGCONT/SIGKILL anyway
authorLennart Poettering <lennart@poettering.net>
Wed, 20 Jul 2016 09:16:53 +0000 (11:16 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 20 Jul 2016 12:35:15 +0000 (14:35 +0200)
src/basic/cgroup-util.c

index 630e15b1416eaa4b1d0a38bb42fbdcf492d53de2..472e24b7a3f7cddc4bb625a8660d3a780977b1a3 100644 (file)
@@ -213,6 +213,11 @@ int cg_kill(
 
         assert(sig >= 0);
 
+         /* Don't send SIGCONT twice. Also, SIGKILL always works even when process is suspended, hence don't send
+          * SIGCONT on SIGKILL. */
+        if (IN_SET(sig, SIGCONT, SIGKILL))
+                flags &= ~CGROUP_SIGCONT;
+
         /* This goes through the tasks list and kills them all. This
          * is repeated until no further processes are added to the
          * tasks list, to properly handle forking processes */