[hackers] [wmii] Go back to closeexec. This was my fault, not xcb's.

From: Kris Maglione <jg_AT_suckless.org>
Date: Sun Feb 03 23:16:59 2008

changeset: 2276:b7cd578b14a3
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Sun Feb 03 17:14:41 2008 -0500
summary: Go back to closeexec. This was my fault, not xcb's.

diff -r 424cd73ecece -r b7cd578b14a3 cmd/wmii.rc.rc
--- a/cmd/wmii.rc.rc Sun Feb 03 16:57:36 2008 -0500
+++ b/cmd/wmii.rc.rc Sun Feb 03 17:14:41 2008 -0500
@@ -141,10 +141,14 @@ fn wi_seltag {
         wmiir read /tag/sel/ctl | sed 1q
 }
 
+fn wi_readevent {
+ wmiir read /event
+}
+
 fn wi_eventloop {
         wi_initkeys
 
- wmiir read /event |
+ wi_readevent |
         while(ifs=$wi_nl{wi_event=`{read}}) {
                 ifs=$wi_nl{
                         wi_arg=`{echo $wi_event | sed 's/^[^ ]+ //'}}
diff -r 424cd73ecece -r b7cd578b14a3 cmd/wmii/main.c
--- a/cmd/wmii/main.c Sun Feb 03 16:57:36 2008 -0500
+++ b/cmd/wmii/main.c Sun Feb 03 17:14:41 2008 -0500
@@ -287,8 +287,6 @@ spawn_command(const char *cmd) {
         if(doublefork() == 0) {
                 if(setsid() == -1)
                         fatal("Can't setsid: %r");
- /* Was closeexeced, but Xlib-xcb doesn't like it. */
- close(ConnectionNumber(display));
 
                 shell = passwd->pw_shell;
                 if(shell[0] != '/')
@@ -370,10 +368,7 @@ main(int argc, char *argv[]) {
         sock = ixp_announce(address);
         if(sock < 0)
                 fatal("Can't create socket '%s': %r", address);
- /* Grr! Xlib-xcb doesn't like this in the least.
- * And I thought XF86 Xlib was bad... *sigh*
         closeexec(ConnectionNumber(display));
- */
         closeexec(sock);
 
         if(wmiirc)
Received on Sun Feb 03 2008 - 23:16:59 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:59:17 UTC