From 3b9d44099f234e8e7c6ab6a5db8482cbc6e65f81 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Mon, 26 Aug 2019 22:04:12 +0200 Subject: [PATCH] signal.7: Enhance the text on process-directed and thread-directed signals clone(2) has a good description of these concepts; borrow from it liberally. Signed-off-by: Michael Kerrisk --- man7/signal.7 | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/man7/signal.7 b/man7/signal.7 index 0804d68f0..0c655135a 100644 --- a/man7/signal.7 +++ b/man7/signal.7 @@ -191,18 +191,29 @@ inherits a copy of its parent's signal mask; the signal mask is preserved across .BR execve (2). .PP -A signal may be generated (and thus pending) -for a process as a whole (e.g., when sent using -.BR kill (2)) -or for a specific thread (e.g., certain signals, -such as +A signal may be process-directed or thread-directed. +A process-directed signal is one that is targeted at (and thus pending for) +the process as a whole. +A signal may be process-directed +because it was generated by the kernel for reasons +other than a hardware exception, or because it was sent using +.BR kill (2) +or +.BR sigqueue (3). +A thread-directed signals is one that is targeted at a specific thread. +A signal may be thread-directed because it was generated as a consequence +of executing a specific machine-language instruction +that triggered a hardware exception (e.g., .B SIGSEGV -and -.BR SIGFPE , -generated as a -consequence of executing a specific machine-language instruction -are thread-directed, as are signals targeted at a specific thread using -.BR pthread_kill (3)). +for an invalid memory access, or +.B SIGFPE +for a math error), or because it was it was +targeted at a specific thread using +interfaces such as +.BR tgkill (2) +or +.BR pthread_kill (3). +.PP A process-directed signal may be delivered to any one of the threads that does not currently have the signal blocked. If more than one of the threads has the signal unblocked, then the