Didier Verna wrote:
> > The real pain is that X considers it fatal to loose a
connection,
> > even in the case you have several ones.
>
> Yuck! Is there a way around that?
Dunno. One day I'll try to return from a fatal io error handler and
continue calling Xlib on the other displays if I have some. I'd be curious to
see if still works but I doubt it seriously. The other solution I was thinking
of was using a set of set/long jmp stuff to go back some place once we know
that a connection is broken (the io error handler was called), and try to
get rid of the connection ourself. I haven't investigated much yet.
I don't think that the problem is likely to be in Xlib, as that is
fairly stateless. _XIOError calls exit() in the event that the error
handler returns, but there shouldn't be a problem with longjmp()ing
back to the main loop. I wrote a simple test program which does this
and it appears to work without any ill effects.
Xt may be a different matter, although it could be as simple as
removing the appropriate `Display *' from the XtAppContext structure,
so that XtAppNextEvent doesn't try select()ing on the corresponding
descriptor, and ensuring that you never pass the `Display *' (or a
Widget etc which refers to it) to Xt after that.
I guess that someone will have to try it and see.
--
Glynn Clements <glynn(a)sensei.co.uk>