From 4730937f2d00844d173cec3bcaa0c0d69c1a4349 Mon Sep 17 00:00:00 2001 From: "B. Bergeron" Date: Sat, 17 May 2025 09:23:41 -0400 Subject: Prevent child processes from becoming zombies Ignoring SIGCHLD causes the system to automatically reap child processes when they terminate, preventing them from becoming zombies. --- src/sxwm.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/sxwm.c b/src/sxwm.c index dd779df..dcf8dbf 100644 --- a/src/sxwm.c +++ b/src/sxwm.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -1230,6 +1231,8 @@ void setup(void) evtable[MotionNotify] = hdl_motion; evtable[PropertyNotify] = hdl_root_property; scan_existing_windows(); + + signal(SIGCHLD, SIG_IGN); /* Prevent child processes from becoming zombies */ } void setup_atoms(void) -- cgit v1.2.3