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.3~68 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=84e95f5f10da05aced04f9785d3db729c29c45e3;p=elogind.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 1e9ec33a9..c98c1c400 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 */