From a3d8d68cc1698d014575f0f66c58e253bd46c240 Mon Sep 17 00:00:00 2001 From: stuart-mclaren Date: Tue, 21 Feb 2017 20:39:52 +0000 Subject: 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. --- src/basic/process-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/basic') 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; -- cgit v1.2.3-54-g00ecf