From 3bf99198a66e794502d338f3d4ee790f9798a01b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 2 Jun 2021 19:55:03 +0200 Subject: [PATCH] sway: restore SIGPIPE handler before exec:ing swaybar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- sway/config/bar.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sway/config/bar.c b/sway/config/bar.c index 8970f3fd..e09add44 100644 --- 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) {