aboutsummaryrefslogtreecommitdiffstats
path: root/man7/signal.7
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2008-10-05 07:41:29 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2008-10-05 07:41:29 +0200
commite66d51d1baae21cdf1569831fe39489640b027ac (patch)
tree8a3f965577d7f86893d886a593b6ffada93701e9 /man7/signal.7
parent22fe4981c27a72a8a14f5b9057ea5da82436c52a (diff)
downloadman-pages-e66d51d1baae21cdf1569831fe39489640b027ac.tar.gz
signal.7: Describe syscalls that synchronously wait for a signal,
(sigwait(), sigwaitinfo(), sigtimedwait(), signalfd) Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man7/signal.7')
-rw-r--r--man7/signal.728
1 files changed, 28 insertions, 0 deletions
diff --git a/man7/signal.7 b/man7/signal.7
index 9c951def11..47289e9d62 100644
--- a/man7/signal.7
+++ b/man7/signal.7
@@ -126,6 +126,34 @@ Suspends execution until any signal is caught.
.BR sigsuspend (2)
Temporarily changes the signal mask (see below) and suspends
execution until one of the unmasked signals is caught.
+.SS Synchronously Accepting a Signal
+Rather than asynchronously catching a signal via a signal handler,
+it is possible to synchronously accept the signal, that is,
+to block execution until the signal is delivered,
+at which point the kernel returns information about the
+signal to the caller.
+There are two general ways to do this:
+.IP * 3
+.BR sigwaitinfo (2),
+.BR sigtimedwait (2),
+and
+.BR sigwait (3)
+suspend execution until one of the signals in a specified
+set is delivered.
+Each of these calls returns information about the delivered signal.
+.IP *
+.BR signalfd (2)
+returns a file descriptor that can be used to read information
+about signals that are delivered to the caller.
+Each
+.BR read (2)
+from this file descriptor blocks until one of the signals
+in the set specified in the
+.BR signalfd (2)
+call is delivered to the caller.
+The buffer returned by
+.BR read (2)
+contains a structure describing the signal.
.SS "Signal Mask and Pending Signals"
A signal may be
.IR blocked ,