changeset: 1478:cf5bb4e72804
tag: tip
user: Anselm R Garbe <garbeam_AT_gmail.com>
date: Thu Aug 13 10:45:59 2009 +0100
files: dwm.c
description:
added merged patch of anydot and Neale
diff -r aefd753cfe9b -r cf5bb4e72804 dwm.c
--- a/dwm.c Mon Jul 27 12:01:58 2009 +0100
+++ b/dwm.c Thu Aug 13 10:45:59 2009 +0100
@@ -207,7 +207,7 @@
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);
@@ -1428,6 +1428,10 @@
int w;
XSetWindowAttributes wa;
+ /* clean up any zombies immediately */
+ signal(SIGCHLD, sigchld);
+ sigchld(0);
+
/* init screen */
screen = DefaultScreen(dpy);
root = RootWindow(dpy, screen);
@@ -1496,13 +1500,13 @@
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));
Received on Thu Aug 13 2009 - 09:46:05 UTC
This archive was generated by hypermail 2.2.0 : Sun Aug 16 2009 - 14:19:04 UTC