From 8238e5242bdbbc4c3b7cba0651c620a89b872a27 Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Sun, 9 Mar 2025 12:07:11 +0100 Subject: 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 --- include/sway/server.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') 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); -- cgit v1.2.3