[Xcb] Developer mad at libx11-xcb

Brandon Philips brandon at ifup.org
Sat Feb 2 11:58:57 PST 2008


Hello All-

I saw this commit come across a list I am on.  Kris is mad at xcb but I
don't know enough about xcb or libx11 to help him.  :D

Perhaps someone from the xcb list could look at this.

The code that this diff is against can be found here:
  http://www.suckless.org/hg.rc/wmii

Thanks,

	Brandon


From: Kris Maglione <jg at suckless.org>
Subject: [hackers] [wmii] libx11-xcb is crap. Don't OCEXEC the X11 socket.

changeset:   2270:e8fd3882ed1d
tag:         tip
user:        Kris Maglione <jg at suckless.org>
date:        Thu Jan 31 19:56:49 2008 -0500
summary:     libx11-xcb is crap. Don't OCEXEC the X11 socket.

diff -r 00383ecd917e -r e8fd3882ed1d cmd/wmii/main.c
--- a/cmd/wmii/main.c	Thu Jan 31 16:32:24 2008 -0500
+++ b/cmd/wmii/main.c	Thu Jan 31 19:56:49 2008 -0500
@@ -334,6 +334,8 @@ 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] != '/')
@@ -396,7 +398,6 @@ main(int argc, char *argv[]) {
 	starting = True;
 
 	initdisplay();
-	closeexec(ConnectionNumber(display));
 
 	xlib_errorhandler = XSetErrorHandler(errorhandler);
 
@@ -416,6 +417,10 @@ 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)




More information about the Xcb mailing list