diff options
author | emersion <contact@emersion.fr> | 2018-08-02 13:03:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-02 13:03:54 +0100 |
commit | e2eaf7b9b521e67d38d24b5f8a38fee84c9295a2 (patch) | |
tree | 30f1998285da49fdf3bfe37b29c8c046b8095071 /sway/commands/exec_always.c | |
parent | d6095588a143710d25be47577ea65517770e7a74 (diff) | |
parent | 7d8413d9628ed493790454410a28b9f0c41444e6 (diff) |
Merge pull request #2405 from marienz/sigmask
Reset signal mask after fork
Diffstat (limited to 'sway/commands/exec_always.c')
-rw-r--r-- | sway/commands/exec_always.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/commands/exec_always.c b/sway/commands/exec_always.c index 9bf2b320..c730cb8b 100644 --- a/sway/commands/exec_always.c +++ b/sway/commands/exec_always.c @@ -4,6 +4,7 @@ #include <string.h> #include <sys/wait.h> #include <unistd.h> +#include <signal.h> #include "sway/commands.h" #include "sway/config.h" #include "sway/tree/container.h" @@ -47,6 +48,9 @@ struct cmd_results *cmd_exec_always(int argc, char **argv) { if ((pid = fork()) == 0) { // Fork child process again setsid(); + sigset_t set; + sigemptyset(&set); + sigprocmask(SIG_SETMASK, &set, NULL); close(fd[0]); if ((child = fork()) == 0) { close(fd[1]); |