diff options
| author | B. Bergeron <me@bbergeron.xyz> | 2025-05-17 09:23:41 -0400 |
|---|---|---|
| committer | B. Bergeron <me@bbergeron.xyz> | 2025-05-17 09:25:29 -0400 |
| commit | 4730937f2d00844d173cec3bcaa0c0d69c1a4349 (patch) | |
| tree | 3273a9b5277f6d150fa8596289b32d5b4967000e /src/sxwm.c | |
| parent | 11bfcf4291bb0b72fd94b8bb69b7fabd3c3fea35 (diff) | |
Prevent child processes from becoming zombies
Ignoring SIGCHLD causes the system to automatically reap child processes
when they terminate, preventing them from becoming zombies.
Diffstat (limited to 'src/sxwm.c')
| -rw-r--r-- | src/sxwm.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -17,6 +17,7 @@ #include <err.h> #include <stdio.h> #include <limits.h> +#include <signal.h> #include <stdlib.h> #include <string.h> #include <sys/wait.h> @@ -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) |
