Skip to content

Commit

Permalink
Fix check for signal in set (#5416)
Browse files Browse the repository at this point in the history
IN_SET(SIGCONT, SIGKILL) will always evaluate to false.
The signal needs to be included as the first argument.

Fixup for 26f417d.
  • Loading branch information
stuart-mclaren authored and keszybz committed Feb 21, 2017
1 parent 85266f9 commit a3d8d68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/basic/process-util.c
Expand Up @@ -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;
Expand Down

0 comments on commit a3d8d68

Please sign in to comment.