Noted that all threads should block signal being waited for.

This commit is contained in:
Michael Kerrisk 2006-04-22 20:57:18 +00:00
parent 21008754d7
commit d1331c6fb7
1 changed files with 10 additions and 2 deletions

View File

@ -21,12 +21,14 @@
.SH NAME
sigwaitinfo, sigtimedwait \- synchronously wait for queued signals
.SH SYNOPSIS
.nf
.B #include <signal.h>
.sp
.BI "int sigwaitinfo(const sigset_t *" set ", siginfo_t *" info ");"
.sp
.BI "int sigtimedwait(const sigset_t *" set ", siginfo_t *" info ", "
.BI "const struct timespec *" timeout ");"
.BI " const struct timespec *" timeout ");"
.fi
.SH DESCRIPTION
.BR sigwaitinfo ()
suspends execution of the calling process until one of the signals in
@ -109,7 +111,7 @@ The wait was interrupted by a signal handler.
.I timeout
was invalid.
.SH NOTES
In normal usage, the caller blocks the signals in
In normal usage, the calling program blocks the signals in
.I set
via a prior call to
.BR sigprocmask ()
@ -119,6 +121,12 @@ are delivered between successive calls to
or
.BR sigtimedwait ())
and does not establish handlers for these signals.
In a multithreaded program,
the signal should be blocked in all threads to prevent
the signal being delivered to a thread other than the one calling
.BR sigwaitinfo ()
or
.BR sigtimedwait ()).
.PP
POSIX leaves the meaning of a NULL value for the
.I timeout