summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2025-03-09 12:07:11 +0100
committerFurkan Sahin <furkan-dev@proton.me>2025-03-09 12:07:11 +0100
commit054c2d814d43eabd97e3902aa2c03d1b0ee7bdbc (patch)
tree04776d22e42cfd1a674a1fe42929fc0cf1d0c516 /include
parent60e05dd567bee2b894aa103ba74dacee320c060e (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);