Skip to content
This repository was archived by the owner on Apr 6, 2024. It is now read-only.

Commit

Permalink
bruh dwm zombies
Browse files Browse the repository at this point in the history
  • Loading branch information
LowByteFox committed Jul 5, 2023
1 parent a4624fa commit 335c157
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/firewm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2019,6 +2019,10 @@ setmfact(const Arg *arg)
arrange(selmon);
}

void sigchld_handler(int signum) {
while (waitpid(-1, NULL, WNOHANG) > 0);
}

void
setup(void)
{
Expand All @@ -2029,6 +2033,12 @@ setup(void)
signal(SIGHUP, sighup);
signal(SIGTERM, sigterm);

struct sigaction sa;
sa.sa_handler = sigchld_handler;
sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_RESTART;
sigaction(SIGCHLD, &sa, NULL);

/* init screen */
screen = DefaultScreen(dpy);
sw = DisplayWidth(dpy, screen);
Expand Down

0 comments on commit 335c157

Please sign in to comment.