.\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk
.\" <mtk.manpages@gmail.com>
.\"
+.\" %%%LICENSE_START(VERBATIM)
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
.\"
-.TH SIGWAIT 3 2009-02-10 "Linux" "Linux Programmer's Manual"
+.TH SIGWAIT 3 2013-12-16 "Linux" "Linux Programmer's Manual"
.SH NAME
sigwait \- wait for a signal
.SH SYNOPSIS
.SH DESCRIPTION
The
.BR sigwait ()
-function suspends execution of the calling thread until the
-delivery of one of the signals specified in the signal set
-.IR set .
+function suspends execution of the calling thread until
+one of the signals specified in the signal set
+.IR set
+becomes pending.
The function accepts the signal
(removes it from the pending list of signals),
and returns the signal number in
The operation of
.BR sigwait ()
is the same as
-.BR sigwaitinfo (),
+.BR sigwaitinfo (2),
except that:
.IP * 2
.BR sigwait ()
-only returns the signal number, rather than a
+returns only the signal number, rather than a
.I siginfo_t
structure describing the signal.
.IP *
On success,
.BR sigwait ()
returns 0.
-On error, it returns a positive error number.
+On error, it returns a positive error number (listed in ERRORS).
.SH ERRORS
.TP
.B EINVAL
.\" Does not occur for glibc.
.I set
contains an invalid signal number.
+.SH ATTRIBUTES
+.SS Multithreading (see pthreads(7))
+The
+.BR sigwait ()
+function is thread-safe.
.SH CONFORMING TO
POSIX.1-2001.
.SH NOTES
.BR sigwait ()
is implemented using
.BR sigtimedwait (2).
-.SH EXAMPLES
+.SH EXAMPLE
See
.BR pthread_sigmask (3).
.SH SEE ALSO
.BR sigwaitinfo (2),
.BR sigsetops (3),
.BR signal (7)
+.SH COLOPHON
+This page is part of release 3.65 of the Linux
+.I man-pages
+project.
+A description of the project,
+and information about reporting bugs,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.