diff options
| author | Anselm R Garbe <garbeam@gmail.com> | 2009-08-13 10:45:59 +0100 |
|---|---|---|
| committer | Anselm R Garbe <garbeam@gmail.com> | 2009-08-13 10:45:59 +0100 |
| commit | 33fe200b521b19a089d39aca247bb78432e02e6d (patch) | |
| tree | 81db8d2dfd7a4ad155ab8e99d0c38b17b16c2dc0 | |
| parent | fixed nn declaration (diff) | |
| download | dwm-33fe200b521b19a089d39aca247bb78432e02e6d.tar.gz dwm-33fe200b521b19a089d39aca247bb78432e02e6d.zip | |
added merged patch of anydot and Neale
| -rw-r--r-- | dwm.c | 10 |
1 files changed, 7 insertions, 3 deletions
| @@ -207,7 +207,7 @@ static void setlayout(const Arg *arg); | |||
| 207 | static void setmfact(const Arg *arg); | 207 | static void setmfact(const Arg *arg); |
| 208 | static void setup(void); | 208 | static void setup(void); |
| 209 | static void showhide(Client *c); | 209 | static void showhide(Client *c); |
| 210 | static void sigchld(int signal); | 210 | static void sigchld(int unused); |
| 211 | static void spawn(const Arg *arg); | 211 | static void spawn(const Arg *arg); |
| 212 | static void tag(const Arg *arg); | 212 | static void tag(const Arg *arg); |
| 213 | static void tagmon(const Arg *arg); | 213 | static void tagmon(const Arg *arg); |
| @@ -1428,6 +1428,10 @@ setup(void) { | |||
| 1428 | int w; | 1428 | int w; |
| 1429 | XSetWindowAttributes wa; | 1429 | XSetWindowAttributes wa; |
| 1430 | 1430 | ||
| 1431 | /* clean up any zombies immediately */ | ||
| 1432 | signal(SIGCHLD, sigchld); | ||
| 1433 | sigchld(0); | ||
| 1434 | |||
| 1431 | /* init screen */ | 1435 | /* init screen */ |
| 1432 | screen = DefaultScreen(dpy); | 1436 | screen = DefaultScreen(dpy); |
| 1433 | root = RootWindow(dpy, screen); | 1437 | root = RootWindow(dpy, screen); |
| @@ -1496,13 +1500,13 @@ showhide(Client *c) { | |||
| 1496 | 1500 | ||
| 1497 | 1501 | ||
| 1498 | void | 1502 | void |
| 1499 | sigchld(int signal) { | 1503 | sigchld(int unused) { |
| 1500 | while(0 < waitpid(-1, NULL, WNOHANG)); | 1504 | while(0 < waitpid(-1, NULL, WNOHANG)); |
| 1505 | signal(SIGCHLD, sigchld); | ||
| 1501 | } | 1506 | } |
| 1502 | 1507 | ||
| 1503 | void | 1508 | void |
| 1504 | spawn(const Arg *arg) { | 1509 | spawn(const Arg *arg) { |
| 1505 | signal(SIGCHLD, sigchld); | ||
| 1506 | if(fork() == 0) { | 1510 | if(fork() == 0) { |
| 1507 | if(dpy) | 1511 | if(dpy) |
| 1508 | close(ConnectionNumber(dpy)); | 1512 | close(ConnectionNumber(dpy)); |
