summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorstuart-mclaren <stuart.mclaren@hp.com>2017-02-21 20:39:52 +0000
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-02-21 15:39:52 -0500
commita3d8d68cc1698d014575f0f66c58e253bd46c240 (patch)
tree68eec3aeea119165f2d2e815681be8c5157bbddb /src
parent85266f9bbac7987352b0992313d143162bcd3181 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/basic/process-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/process-util.c b/src/basic/process-util.c
index eead8b00da..87e5586027 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;