[Gllug] "X connection to :0.0 broken"
Nix
nix at esperi.org.uk
Wed Sep 28 20:07:18 UTC 2005
On Wed, 28 Sep 2005, Qingning Huo whispered secretively:
> On 9/27/05, Nix <nix at esperi.org.uk> wrote:
>> 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.)
>
> Does that mean somehow xclock failed to respond to the WM_DELETE_WINDOW
> event, and therefore the window manager has to do a XKillClient()?
If it failed to respond, nothing would happen.
This is peculiar: my xclock handles deletion requests fine; the ability
to do so is wired into Xlib these days.
>> 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.
>
> I understand that xlib exit(1) when X connection is down (killed by
> XKillClient).
> The question is why XKillClient is even used to terminate xclock. There is no
> reason for xclock not to respond to WM_DELETE_WINDOW event. And why
> the result is undeterminate?
I'd expect a clean partitioning into two cases:
- XKillClient()-style kill, exit code nonzero
- clean shutdown, exit code zero
> By the way, what do you get when running "xclock && echo ok" for a couple of
> times? And what is your window manager? I am thinkg this maybe a problem
> of my window manager (fluxbox).
As I described above: Destroy -> nonzero, Close -> zero.
I'm using fvwm 2.5.12, which despite the number is not a development-quality
release at all.
It feels like fluxbox is failing to spot the Close-ability to me. This
seems like a really rather big bug...
Time to kick up an Xnest with a copy of fluxbox under a debugger :)))
> This is not a problem for xclock, but for any serious application,
> abnormal exit from inside xlib denies the program any change to do the
> cleanup job. This could be a big problem for some programs.
Agreed.
--
`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