OSDN Git Service

(split) LDP: Update original to LDP v3.65
[linuxjm/LDP_man-pages.git] / original / man3 / sigwait.3
index b7da0e5..5fe4b2f 100644 (file)
@@ -1,6 +1,7 @@
 .\" 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.
@@ -20,8 +21,9 @@
 .\"
 .\" 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
@@ -43,9 +45,10 @@ _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
 .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
@@ -54,11 +57,11 @@ 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 *
@@ -67,20 +70,25 @@ The return values of the two functions are different.
 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
@@ -91,3 +99,11 @@ See
 .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/.