[unclassified] Re: [x11] Application persistency even when DISPLAY connection is lost
glynn at gclements.plus.com
Sat Mar 3 16:58:47 PST 2007
John Klingler wrote:
> > > Unfortunately, Xlib exits when a display connection is broken.
> > > In order to restore an application that has exited when the
> > > connection can be re-established, it is necessary to have a
> > > parent process without a display connection to detect when the
> > > application has exited and restart it. I call this a "heartbeat
> > > monitor" and have implemented these on commercial applications.
> > actuallt that's incorrect. that is only the DEFAULT behavior. you can set an
> > xlib io handler that will stop this from happening and then re-establish the
> > connection. no need for a parent process, shared memory etc.
> Really? I was never able to get my io handler to do that. Just how do
> you go about it? ;-)
You have to longjmp() out of the I/O error handler; if it returns,
Xlib will call exit().
Glynn Clements <glynn at gclements.plus.com>
More information about the xorg