[Xcb] Developer mad at libx11-xcb

Barton C Massey bart at cs.pdx.edu
Sat Feb 2 19:57:39 PST 2008


Can someone help us debug this?  Is the problem that the
ConnectionNumber() macro is losing?  That would not shock
me, although it's hard to fix.  Could you try calling the
XConnectionNumber() function instead?  My guess is that this
will work for you, which will help us debug the problem.

Thanks much.

	Bart

In message <20080202195857.GB29900 at plankton.ifup.org> you wrote:
> 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)
> 
> 
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb


More information about the Xcb mailing list