From 0e94989547d73b1dd3fb1d5c3ee6ce771fff2e0e Mon Sep 17 00:00:00 2001 From: speedie Date: Tue, 11 Apr 2023 22:03:04 +0200 Subject: [PATCH] apply latest suckless commit --- speedwm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/speedwm.c b/speedwm.c index 0546eb9..f2ddc21 100644 --- a/speedwm.c +++ b/speedwm.c @@ -5384,6 +5384,8 @@ sortscreens(XineramaScreenInfo *screens, int n) void spawn(const Arg *arg) { + struct sigaction sa; + if (fork() == 0) { if (dpy) close(ConnectionNumber(dpy)); @@ -5415,6 +5417,12 @@ spawn(const Arg *arg) #endif setsid(); + + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + sa.sa_handler = SIG_DFL; + sigaction(SIGCHLD, &sa, NULL); + execvp(((char **)arg->v)[0], (char **)arg->v); die("speedwm: execvp '%s' failed:", ((char **)arg->v)[0]);