aboutsummaryrefslogtreecommitdiff
path: root/dwl.c
diff options
context:
space:
mode:
Diffstat (limited to 'dwl.c')
-rw-r--r--dwl.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/dwl.c b/dwl.c
index 5562a90..749a0a4 100644
--- a/dwl.c
+++ b/dwl.c
@@ -1619,21 +1619,10 @@ gpureset(struct wl_listener *listener, void *data)
void
handlesig(int signo)
{
- if (signo == SIGCHLD) {
- while (waitpid(-1, NULL, WNOHANG) > 0) {
- pid_t *p, *lim;
- if (!(p = autostart_pids))
- continue;
- lim = &p[autostart_len];
-
- for (; p < lim; p++) {
- if (*p == in.si_pid) {
- *p = -1;
- break;
- }
- }
- }
- } else if (signo == SIGINT || signo == SIGTERM)
+ if (signo == SIGCHLD)
+ while (waitpid(-1, NULL, WNOHANG) > 0)
+ ;
+ else if (signo == SIGINT || signo == SIGTERM)
quit(NULL);
}