diff options
Diffstat (limited to 'monsterwm.c')
| -rw-r--r-- | monsterwm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/monsterwm.c b/monsterwm.c index aa03fe5..c3dff0a 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -788,9 +788,8 @@ void setup(void) { } void sigchld() { - if (signal(SIGCHLD, sigchld) == SIG_ERR) - err(EXIT_FAILURE, "cannot install SIGCHLD handler"); - while(0 < waitpid(-1, NULL, WNOHANG)); + if (signal(SIGCHLD, sigchld) != SIG_ERR) while(0 < waitpid(-1, NULL, WNOHANG)); + else err(EXIT_FAILURE, "cannot install SIGCHLD handler"); } /* execute a command */ |
