]> git.mdlowis.com Git - proto/labwc.git/commitdiff
src/common/spawn.c: Restore SIGPIPE default handler before exec
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Sun, 29 Oct 2023 09:54:44 +0000 (10:54 +0100)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Sun, 29 Oct 2023 14:18:32 +0000 (15:18 +0100)
Fixes: #1209
Reported-by: @bdantas
src/common/spawn.c

index 349f65fcec9482bb7aa6b6d5ef4b35f5ee3229d0..66e7ad1d8860be85acb956868dc8b86fa4645e5c 100644 (file)
@@ -46,6 +46,8 @@ spawn_async_no_shell(char const *command)
                sigset_t set;
                sigemptyset(&set);
                sigprocmask(SIG_SETMASK, &set, NULL);
+               /* Restore ignored signals */
+               signal(SIGPIPE, SIG_DFL);
                grandchild = fork();
                if (grandchild == 0) {
                        execvp(argv[0], argv);