emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Delivering SIGIO when several threads are active?


From: Eli Zaretskii
Subject: Delivering SIGIO when several threads are active?
Date: Fri, 30 Dec 2016 12:25:46 +0200

When SIGIO is received by some thread, we currently deliver it to the
main thread, see deliver_input_available_signal and
deliver_process_signal.  Is that appropriate when more than one thread
is active?  The SIGIO handler just sets a global variable, so the
handler itself is okay, I think, but is it okay to interrupt the main
thread with SIGIO at some arbitrary point?  E.g., the main thread
could be in some Xlib or GTK call.

The comments to deliver_process_signal say:

                 POSIX says any thread can receive a signal that is
   associated with a process, process group, or asynchronous event.
   On GNU/Linux that is not true, but for other systems (FreeBSD at
   least) it is.

What does happen on GNU/Linux?  Is there a specific thread on
GNU/Linux which gets signals associated with a process?  And if so,
does this affect what we should do with SIGIO in this case?

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]