On Sat, 2 Feb 2002, Harold L Hunt wrote:
> The problem is that XNextEvent () is a blocking function, just like Win32's
> GetMessage () function. The problem here is when the X Server exits or
> resets while XNextEvent () is blocking... in that case our X Client
> (xwinclip) gets no notification that the X Server is exiting or resetting and
> Xlib calls exit () for the X Client. I'm trying to find a way around that...
> primarily by seeing if there is a way to get notification before Xlib calls
> exit (), that way we could close down the connection in a proper fashion.
man XSetIOErrorHandler:
The XSetIOErrorHandler sets the fatal I/O error handler.
Xlib calls the program's supplied error handler if any
sort of system call error occurs (for example, the connec�
tion to the server was lost). This is assumed to be a
fatal condition, and the called routine should not return.
If the I/O error handler does return, the client process
exits.
To avoid the return you might return via setjmp/longjmp back to the startup
code (and maybe sleep a while before doing so)
HTH
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