Glynn Clements <glynn.clements(a)virgin.net> writes:
Gunnar Evermann wrote:
> ------------------------------------------------------------
> XtAppPending (Xt_app_con);
> XEventsQueued (display, QueuedAfterReading);
> queued = XCheckIfEvent (display, &event,
> quit_char_predicate,
> (char *) &critical_quit);
> ------------------------------------------------------------
>
> To be able to interrupt system calls (like a hung connect()) with C-g
> the above is called _once_ from a SIGALARM signal handler.
I have no idea whether it is safe to call any of these functions from
within a signal handler.
Sorry, my description was pretty bad. It is not actually called from
the signal hander. The handler just sets some flags and returns. The
interrupted syscall will then fail with EINTR (or ERESTARTSYS).
x_check_for_quit_char() is then called from our QUITP macro in normal
code.
thanks anyway.
Gunnar