Integrating xwinclip support

Alexander Gottwald Alexander.Gottwald@informatik.tu-chemnitz.de
Sun Feb 3 15:56:00 GMT 2002


On Sun, 3 Feb 2002, Brian Genisio wrote:
> I am not sure that would be the best programming practice... (I could be wrong)
>  Wont that leave the IOErrorHandler function call still on the stack, causing
> problems on multiple restarts of the server?  
> 
> Or does that setjmp/longjmp change the address of the return completely?  Will
> that leave other calls on the stack?  If I am wrong on this, could you explain
> this practice please?  I have never used such a technique, and I am curious.

I never did either. But as far as I know does longjmp does rewind the stack
direkt after the setjmp call. It's like rewinding everything you did last day 
and wake up again :)

xwinclip might look like this

init
SetIOErrorHandler
setjmp
XOpenDisplay <----------------------+ 
while (true)                        |
    XNextEvent                      |  
     |  processEvent                |
     |                              |
     |(on error)                    |  
     +---> IOErrorHandler           |
                CloseConnection     |
                longjmp ------------+


To integrate it into the server, you would have to create a new thread/
process at server statup and start in the diagram at "init"
                
bye
    ago
-- 
 Alexander.Gottwald@informatik.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723
 phone: +49 3725 349 80 80	mobile: +49 172 7854017
 4. Chemnitzer Linux-Tag http://www.tu-chemnitz.de/linux/tag/lt4



More information about the Cygwin-xfree mailing list