[Gllug] "X connection to :0.0 broken"

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


On Tue, 27 Sep 2005, Qingning Huo uttered the following:
> On 9/27/05, Rev Simon Rumble <simon at rumble.net> wrote:
>>
>> 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.
> 
> As I understand, the socket is a connection to the X server, instead of
> the window manager.

Yes. A close button should cause the wm to send a signal, but if that
doesn't work, X will be asked to tear down the connection between X
and the client, via XKillClient(). (This is exactly what the xkill
utility does.)

>> 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.
> 
> The X client here is xclock.  There is no button inside the application,
> nor any menus.  Try this:
> 
> xclock && echo ok
> 
> I get different results randomly.

That's a matter of the return code of xclock. Looking at the source, xclock
should always exit with success if the WM has killed it by hitting it with
a WM_DELETE_WINDOW request --- in fact, every exit path from xclock itself
exits with success. Only the inside of Xlib can exit in any other way.

-- 
`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