sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 3bf99198a66e794502d338f3d4ee790f9798a01b
parent 1dd6df6a5df3924d42a25bd17dab0ef8beecad61
Author: Daniel Eklöf <daniel@ekloef.se>
Date:   Wed,  2 Jun 2021 19:55:03 +0200

sway: restore SIGPIPE handler before exec:ing swaybar

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

Diffstat:
Msway/config/bar.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/sway/config/bar.c b/sway/config/bar.c @@ -217,6 +217,7 @@ static void invoke_swaybar(struct bar_config *bar) { sigset_t set; sigemptyset(&set); sigprocmask(SIG_SETMASK, &set, NULL); + signal(SIGPIPE, SIG_DFL); pid = fork(); if (pid < 0) {