[hackers] [wmii] Unbreak double fork hack.

From: Kris Maglione <jg_AT_suckless.org>
Date: Tue Jul 03 11:59:38 2007

changeset: 2192:4889a8a4ec2a
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Tue Jul 03 05:55:35 2007 -0400
summary: Unbreak double fork hack.

diff -r f7d94bbe40b9 -r 4889a8a4ec2a cmd/wmii/main.c
--- a/cmd/wmii/main.c Tue Jul 03 05:49:34 2007 -0400
+++ b/cmd/wmii/main.c Tue Jul 03 05:55:35 2007 -0400
@@ -308,9 +308,6 @@ init_traps(void) {
                         fatal("Can't fork(): %r");
                         break; /* not reached */
                 case 0:
- exit(0);
- break;
- default:
                         close(fd[1]);
                         close(ConnectionNumber(display));
                         setsid();
@@ -325,6 +322,9 @@ init_traps(void) {
                         XSetInputFocus(display, PointerRoot, RevertToPointerRoot, CurrentTime);
                         XCloseDisplay(display);
                         exit(0);
+ default:
+ exit(0);
+ break;
                 }
         default:
                 waitpid(pid, &status, 0);
Received on Tue Jul 03 2007 - 11:59:38 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:57:32 UTC