signal.7: Describe syscalls that synchronously wait for a signal,

(sigwait(), sigwaitinfo(), sigtimedwait(), signalfd)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2008-10-05 07:41:29 +02:00
parent 22fe4981c2
commit e66d51d1ba
1 changed files with 28 additions and 0 deletions

View File

@ -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 ,