equal
deleted
inserted
replaced
1427 unsigned int i; |
1427 unsigned int i; |
1428 int w; |
1428 int w; |
1429 XSetWindowAttributes wa; |
1429 XSetWindowAttributes wa; |
1430 |
1430 |
1431 /* clean up any zombies immediately */ |
1431 /* clean up any zombies immediately */ |
1432 signal(SIGCHLD, sigchld); |
|
1433 sigchld(0); |
1432 sigchld(0); |
1434 |
1433 |
1435 /* init screen */ |
1434 /* init screen */ |
1436 screen = DefaultScreen(dpy); |
1435 screen = DefaultScreen(dpy); |
1437 root = RootWindow(dpy, screen); |
1436 root = RootWindow(dpy, screen); |
1499 } |
1498 } |
1500 |
1499 |
1501 |
1500 |
1502 void |
1501 void |
1503 sigchld(int unused) { |
1502 sigchld(int unused) { |
|
1503 if(signal(SIGCHLD, sigchld) == SIG_ERR) |
|
1504 die("Can't install SIGCHLD handler"); |
1504 while(0 < waitpid(-1, NULL, WNOHANG)); |
1505 while(0 < waitpid(-1, NULL, WNOHANG)); |
1505 signal(SIGCHLD, sigchld); |
|
1506 } |
1506 } |
1507 |
1507 |
1508 void |
1508 void |
1509 spawn(const Arg *arg) { |
1509 spawn(const Arg *arg) { |
1510 if(fork() == 0) { |
1510 if(fork() == 0) { |