From 84e95f5f10da05aced04f9785d3db729c29c45e3 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 20 Jul 2016 11:16:53 +0200 Subject: [PATCH] cgroup: suppress sending follow-up SIGCONT after sending SIGCONT/SIGKILL anyway --- src/basic/cgroup-util.c | 5 +++++ 1 file changed, 5 insertions(+) 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 */ -- 2.30.2