cgroup: suppress sending follow-up SIGCONT after sending SIGCONT/SIGKILL anyway

This commit is contained in:
Lennart Poettering 2016-07-20 11:16:53 +02:00
parent 1d98fef17d
commit 0d5b481092
1 changed files with 5 additions and 0 deletions

View 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 */