--- dwm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dwm.c b/dwm.c index d27cb67..f593007 100644 --- a/dwm.c +++ b/dwm.c _AT_@ -1537,9 +1537,14 @@ setup(void) int i; XSetWindowAttributes wa; Atom utf8string; + struct sigaction sa; /* clean up any zombies immediately */ - sigchld(0); + sa.sa_handler = sigchld; + sa.sa_flags = SA_RESTART; + sigemptyset(&sa.sa_mask); + if (sigaction(SIGCHLD, &sa, NULL)) + die("can't install SIGCHLD handler:"); /* init screen */ screen = DefaultScreen(dpy); _AT_@ -1635,8 +1640,6 @@ showhide(Client *c) void sigchld(int unused) { - if (signal(SIGCHLD, sigchld) == SIG_ERR) - die("can't install SIGCHLD handler:"); while (0 < waitpid(-1, NULL, WNOHANG)); } -- 2.11.0Received on Sun Jan 22 2017 - 16:08:42 CET
This archive was generated by hypermail 2.3.0 : Sun Jan 22 2017 - 16:12:17 CET