Skip to content

Commit

Permalink
added merged patch of anydot and Neale
Browse files Browse the repository at this point in the history
  • Loading branch information
garbeam committed Aug 13, 2009
1 parent 66ff9f7 commit 7689e18
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions dwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static void setlayout(const Arg *arg);
static void setmfact(const Arg *arg);
static void setup(void);
static void showhide(Client *c);
static void sigchld(int signal);
static void sigchld(int unused);
static void spawn(const Arg *arg);
static void tag(const Arg *arg);
static void tagmon(const Arg *arg);
Expand Down Expand Up @@ -1428,6 +1428,10 @@ setup(void) {
int w;
XSetWindowAttributes wa;

/* clean up any zombies immediately */
signal(SIGCHLD, sigchld);
sigchld(0);

/* init screen */
screen = DefaultScreen(dpy);
root = RootWindow(dpy, screen);
Expand Down Expand Up @@ -1496,13 +1500,13 @@ showhide(Client *c) {


void
sigchld(int signal) {
sigchld(int unused) {
while(0 < waitpid(-1, NULL, WNOHANG));
signal(SIGCHLD, sigchld);
}

void
spawn(const Arg *arg) {
signal(SIGCHLD, sigchld);
if(fork() == 0) {
if(dpy)
close(ConnectionNumber(dpy));
Expand Down

0 comments on commit 7689e18

Please sign in to comment.