[unclassified] Re: [x11] Application persistency even when DISPLAY connection is lost

Carsten Haitzler (The Rasterman) raster at rasterman.com
Sat Mar 3 19:21:20 PST 2007


On Sat, 03 Mar 2007 13:19:44 -0800 John Klingler <john at jupiter.com> babbled:

> 
> 
> Carsten Haitzler (The Rasterman) wrote:
> 
> >On Fri, 02 Mar 2007 16:48:23 -0800 John Klingler <john at jupiter.com> babbled:
> >
> >  
> >
> >>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? ;-)

setjmp()/longjmp() is 1 way
exec() (re-execute yourself) is another (in the handler save state somewhere
you can get it back after exec() and the rebuild state).

> John
> 
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster at rasterman.com
裸好多
Tokyo, Japan (東京 日本)



More information about the xorg mailing list