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 -- [EMAIL PROTECTED] 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