From: stuart-mclaren Date: Tue, 21 Feb 2017 20:39:52 +0000 (+0000) Subject: Fix check for signal in set (#5416) X-Git-Tag: v233~53 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a3d8d68cc1698d014575f0f66c58e253bd46c240;p=thirdparty%2Fsystemd.git Fix check for signal in set (#5416) IN_SET(SIGCONT, SIGKILL) will always evaluate to false. The signal needs to be included as the first argument. Fixup for 26f417d3e8dd2522adfdc4c8fed4c36fa40f48fc. --- diff --git a/src/basic/process-util.c b/src/basic/process-util.c index eead8b00dae..87e55860278 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c @@ -703,7 +703,7 @@ int kill_and_sigcont(pid_t pid, int sig) { /* If this worked, also send SIGCONT, unless we already just sent a SIGCONT, or SIGKILL was sent which isn't * affected by a process being suspended anyway. */ - if (r >= 0 && !IN_SET(SIGCONT, SIGKILL)) + if (r >= 0 && !IN_SET(sig, SIGCONT, SIGKILL)) (void) kill(pid, SIGCONT); return r;