diff options
author | Devin J. Pohly <djpohly@gmail.com> | 2023-06-15 23:57:16 -0500 |
---|---|---|
committer | Leonardo Hernández <leohdz172@proton.me> | 2023-06-16 00:24:17 -0600 |
commit | 9c592da01f7648ff1efb69e851ced554b3231096 (patch) | |
tree | 501970d8b596c64c48631ad9706025eda1a48ad2 | |
parent | df11b7a7864b416bba52e00d6ad7997d9a7c19b0 (diff) |
Reset ignored signal handler in spawn() as well
-rw-r--r-- | dwl.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2327,6 +2327,9 @@ void spawn(const Arg *arg) { if (fork() == 0) { + struct sigaction sa = {.sa_flags = SA_RESTART, .sa_handler = SIG_DFL}; + sigemptyset(&sa.sa_mask); + sigaction(SIGCHLD, &sa, NULL); dup2(STDERR_FILENO, STDOUT_FILENO); setsid(); execvp(((char **)arg->v)[0], (char **)arg->v); |