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 26f417d3e8.
This commit is contained in:
stuart-mclaren
2017-02-21 15:39:52 -05:00
committed by Zbigniew Jędrzejewski-Szmek
parent 85266f9bba
commit a3d8d68cc1
+1 -1
View File
@@ -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;