diff options
| author | Paul Eggert | 2016-12-30 09:45:46 -0800 |
|---|---|---|
| committer | Paul Eggert | 2016-12-30 09:46:59 -0800 |
| commit | 83cc8a19b45cb2279c128b781e79d81bb91aac58 (patch) | |
| tree | b94ea65969244c35f5bb5810569a33bacdd29703 /src | |
| parent | a285645b8ba0b01e559a26258035ae1a70e3fad2 (diff) | |
| download | emacs-83cc8a19b45cb2279c128b781e79d81bb91aac58.tar.gz emacs-83cc8a19b45cb2279c128b781e79d81bb91aac58.zip | |
* src/sysdep.c (deliver_process_signal): Improve comment.
Diffstat (limited to 'src')
| -rw-r--r-- | src/sysdep.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index 86d420f66c4..1ba336e387a 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -1616,14 +1616,17 @@ static pthread_t main_thread; | |||
| 1616 | #endif | 1616 | #endif |
| 1617 | 1617 | ||
| 1618 | /* SIG has arrived at the current process. Deliver it to the main | 1618 | /* SIG has arrived at the current process. Deliver it to the main |
| 1619 | thread, which should handle it with HANDLER. | 1619 | thread, which should handle it with HANDLER. (Delivering the |
| 1620 | signal to some other thread might not work if the other thread is | ||
| 1621 | about to exit.) | ||
| 1620 | 1622 | ||
| 1621 | If we are on the main thread, handle the signal SIG with HANDLER. | 1623 | If we are on the main thread, handle the signal SIG with HANDLER. |
| 1622 | Otherwise, redirect the signal to the main thread, blocking it from | 1624 | Otherwise, redirect the signal to the main thread, blocking it from |
| 1623 | this thread. POSIX says any thread can receive a signal that is | 1625 | this thread. POSIX says any thread can receive a signal that is |
| 1624 | associated with a process, process group, or asynchronous event. | 1626 | associated with a process, process group, or asynchronous event. |
| 1625 | On GNU/Linux that is not true, but for other systems (FreeBSD at | 1627 | On GNU/Linux the main thread typically gets a process signal unless |
| 1626 | least) it is. */ | 1628 | it's blocked, but other systems (FreeBSD at least) can deliver the |
| 1629 | signal to other threads. */ | ||
| 1627 | void | 1630 | void |
| 1628 | deliver_process_signal (int sig, signal_handler_t handler) | 1631 | deliver_process_signal (int sig, signal_handler_t handler) |
| 1629 | { | 1632 | { |