From: Lennart Poettering Date: Wed, 20 Jul 2016 09:16:53 +0000 (+0200) Subject: cgroup: suppress sending follow-up SIGCONT after sending SIGCONT/SIGKILL anyway X-Git-Tag: v231~28^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d5b4810929f3e224c392ede913bb81042800101;p=thirdparty%2Fsystemd.git cgroup: suppress sending follow-up SIGCONT after sending SIGCONT/SIGKILL anyway --- diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c index 630e15b1416..472e24b7a3f 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c @@ -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 */