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.3~40 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=2dcd4294c12c20431474542b455584e83b3f7af9 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 a5f355c10..8ced76a89 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c @@ -708,7 +708,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;