]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
Noted that all threads should block signal being waited for.
authorMichael Kerrisk <mtk.manpages@gmail.com>
Sat, 22 Apr 2006 20:57:18 +0000 (20:57 +0000)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Sat, 22 Apr 2006 20:57:18 +0000 (20:57 +0000)
man2/sigwaitinfo.2

index 3d888a3644e686709a9deaae3c09e346d94cdfb0..a7f70fe247661ef26905c625b04d1c216f801de3 100644 (file)
 .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