Gunnar Evermann wrote:
I need some advice from people who understand X.
I am trying to debug a problem with the C-g detection in xemacs. The
main part of this is in x_check_for_quit_char() which does the
following:
------------------------------------------------------------
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. I note that the XtAppAddSignal(3) manpage
says:
XtNoticeSignal is the only Intrinsics function that can
safely be called from a signal handler.
I presume that this applies regardless of whether or not
XtAppAddSignal is used to register the handler.
--
Glynn Clements <glynn.clements(a)virgin.net>