diff --git a/dwm.c b/dwm.c index 7c0f978..b3c43ee 100644 --- a/dwm.c +++ b/dwm.c @@ -1541,8 +1541,6 @@ setup(void) Atom utf8string; /* clean up any zombies immediately */ - if (signal(SIGCHLD, sigchld) == SIG_ERR) - die("can't install SIGCHLD handler:"); sigchld(0); /* init screen */ @@ -1640,6 +1638,8 @@ 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)); }