[Gllug] "X connection to :0.0 broken"

Nix nix at esperi.org.uk
Tue Sep 27 14:14:21 UTC 2005


On Tue, 27 Sep 2005, Simon Rumble stated:
> 
> On 27/9/2005, "Qingning Huo" <qingninghuo at gmail.com> wrote:
> 
>>Did you mean killed by a signal?  I think the window manager (fluxbox
>>here) should send some X event to the X clients.  And, strace does not
>>show any signal received.  What strace does show is:
> 
> I don't think the window manager sends a signal, I think it just closes
> the socket to the client.

That's correct.

,----[ xc/lib/X11/XlibInt.c:_XDefaultIOError() ]
| 	if (ECHECK(EPIPE)) {
| 	    (void) fprintf (stderr,
| 	"X connection to %s broken (explicit kill or server shutdown).\r\n",
| 			    DisplayString (dpy));
`----

And a SIGPIPE means the socket was closed abruptly by the peer.

(In days gone by, X installations would hit you with scads of `broken
pipe' messages whenever they shut down, because their Xlib
implementations didn't trap this signal. That was definitely a
suboptimal user-interface design choice :) )

>>It seems that fd=3 (a unix stream socket to /tmp/.X11-unix/X0) is
>>closed.  That's why it said "X connection to :0.0 broken".  But why
>>does it happen randomly?
> 
> I don't think it's random, I think it's when you use the WM's close
> button rather than the one inside the application.

Well, a close button should cause the WM to send WM_DELETE_WINDOW to the
application, really (assuming the application has said that it supports
it in its EWMH hints, or whatever).

The *destroy* button is what should brutally tear down the X connection;
and the close button might do that if the application doesn't advertise
support for WM_DELETE_WINDOW. But having a separate way to do a destroy
is still useful for dealing with hung apps without resorting to
kills. :)

> But I'm no X guru.  Maybe there's one around?

I doubt it.

-- 
`One cannot, after all, be expected to read every single word
 of a book whose author one wishes to insult.' --- Richard Dawkins
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list