mirror of
https://github.com/NickHu/sway
synced 2024-12-26 21:58:30 +01:00
sway: commands: exec: restore SIGPIPE before exec:ing
Sway ignores SIGPIPE (by installing a SIG_IGN handler), in order to “prevent IPC from crashing Sway”. SIG_IGN handlers are the *only* signal handlers inherited in sub-processes. As such, we should be a good citizen and restore the SIGPIPE handler to its default handler. Original bug report: https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1806907.html
This commit is contained in:
parent
b997147284
commit
1dd6df6a5d
1 changed files with 1 additions and 0 deletions
|
@ -57,6 +57,7 @@ struct cmd_results *cmd_exec_process(int argc, char **argv) {
|
|||
sigset_t set;
|
||||
sigemptyset(&set);
|
||||
sigprocmask(SIG_SETMASK, &set, NULL);
|
||||
signal(SIGPIPE, SIG_DFL);
|
||||
close(fd[0]);
|
||||
if ((child = fork()) == 0) {
|
||||
close(fd[1]);
|
||||
|
|
Loading…
Reference in a new issue