aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2025-03-09 12:07:11 +0100
committerKenny Levinsen <kl@kl.wtf>2025-03-11 09:15:05 +0100
commit8238e5242bdbbc4c3b7cba0651c620a89b872a27 (patch)
tree04776d22e42cfd1a674a1fe42929fc0cf1d0c516 /include
parent5d7b9a8320f8999059f287734c1df76289b01a27 (diff)
Use SIG_IGN for SIGCHLD instead of our own handler
The behavior of handlers registered with signal(3p) is not well-defined for signals delivered more than once, as laid out in the man page. We should replace our use of signal with sigaction, but for SIGCHLD specifically we can also just skip the signals altogether by setting the handler to SIG_IGN which causes child reaping to not be required. Fixes: https://github.com/swaywm/sway/pull/8567
Diffstat (limited to 'include')
-rw-r--r--include/sway/server.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sway/server.h b/include/sway/server.h
index 95c9c45b..feb516c5 100644
--- a/include/sway/server.h
+++ b/include/sway/server.h
@@ -163,6 +163,7 @@ bool server_start(struct sway_server *server);
void server_run(struct sway_server *server);
void restore_nofile_limit(void);
+void restore_signals(void);
void handle_new_output(struct wl_listener *listener, void *data);