mirror of https://github.com/mkerrisk/man-pages
sigwaitinfo.2: Some wording clarifications
Mainly rewording things like "is delivered" to "becomes pending", which is more accurate terminology. Reported-by: Daniel Zingaro <daniel.zingaro@utoronto.ca> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
4e9ee22571
commit
bf1298c9e5
|
@ -20,7 +20,7 @@
|
||||||
.\" Formatted or processed versions of this manual, if unaccompanied by
|
.\" Formatted or processed versions of this manual, if unaccompanied by
|
||||||
.\" the source, must acknowledge the copyright and authors of this work.
|
.\" the source, must acknowledge the copyright and authors of this work.
|
||||||
.\"
|
.\"
|
||||||
.TH SIGWAITINFO 2 2012-05-02 "Linux" "Linux Programmer's Manual"
|
.TH SIGWAITINFO 2 2012-07-21 "Linux" "Linux Programmer's Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
sigwaitinfo, sigtimedwait \- synchronously wait for queued signals
|
sigwaitinfo, sigtimedwait \- synchronously wait for queued signals
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -45,28 +45,30 @@ _POSIX_C_SOURCE\ >=\ 199309L
|
||||||
.BR sigwaitinfo ()
|
.BR sigwaitinfo ()
|
||||||
suspends execution of the calling thread until one of the signals in
|
suspends execution of the calling thread until one of the signals in
|
||||||
.I set
|
.I set
|
||||||
is delivered.
|
is pending
|
||||||
(If one of the signals in
|
(If one of the signals in
|
||||||
.I set
|
.I set
|
||||||
is already pending for the calling thread,
|
is already pending for the calling thread,
|
||||||
.BR sigwaitinfo ()
|
.BR sigwaitinfo ()
|
||||||
will return immediately with information about that signal.)
|
will return immediately.)
|
||||||
|
|
||||||
.BR sigwaitinfo ()
|
.BR sigwaitinfo ()
|
||||||
removes the delivered signal from the set of pending
|
removes the signal from the set of pending
|
||||||
signals and returns the signal number as its function result.
|
signals and returns the signal number as its function result.
|
||||||
If the
|
If the
|
||||||
.I info
|
.I info
|
||||||
argument is not NULL,
|
argument is not NULL,
|
||||||
then it returns a structure of type
|
then the buffer that it points to is used to return a structure of type
|
||||||
.I siginfo_t
|
.I siginfo_t
|
||||||
(see
|
(see
|
||||||
.BR sigaction (2))
|
.BR sigaction (2))
|
||||||
containing information about the signal.
|
containing information about the signal.
|
||||||
.PP
|
.PP
|
||||||
Signals returned via
|
If multiple signals in
|
||||||
|
.I set
|
||||||
|
are pending for the caller, the signal that is retrieved by
|
||||||
.BR sigwaitinfo ()
|
.BR sigwaitinfo ()
|
||||||
are delivered in the usual order; see
|
is determined according to the usual ordering rules; see
|
||||||
.BR signal (7)
|
.BR signal (7)
|
||||||
for further details.
|
for further details.
|
||||||
.PP
|
.PP
|
||||||
|
@ -112,7 +114,7 @@ set to indicate the error.
|
||||||
.B EAGAIN
|
.B EAGAIN
|
||||||
No signal in
|
No signal in
|
||||||
.I set
|
.I set
|
||||||
was delivered within the
|
was became pending within the
|
||||||
.I timeout
|
.I timeout
|
||||||
period specified to
|
period specified to
|
||||||
.BR sigtimedwait ().
|
.BR sigtimedwait ().
|
||||||
|
@ -134,14 +136,15 @@ In normal usage, the calling program blocks the signals in
|
||||||
via a prior call to
|
via a prior call to
|
||||||
.BR sigprocmask (2)
|
.BR sigprocmask (2)
|
||||||
(so that the default disposition for these signals does not occur if they
|
(so that the default disposition for these signals does not occur if they
|
||||||
are delivered between successive calls to
|
become pending between successive calls to
|
||||||
.BR sigwaitinfo ()
|
.BR sigwaitinfo ()
|
||||||
or
|
or
|
||||||
.BR sigtimedwait ())
|
.BR sigtimedwait ())
|
||||||
and does not establish handlers for these signals.
|
and does not establish handlers for these signals.
|
||||||
In a multithreaded program,
|
In a multithreaded program,
|
||||||
the signal should be blocked in all threads to prevent
|
the signal should be blocked in all threads, in order to prevent
|
||||||
the signal being delivered to a thread other than the one calling
|
the signal being treated according to its default disposition in
|
||||||
|
a thread other than the one calling
|
||||||
.BR sigwaitinfo ()
|
.BR sigwaitinfo ()
|
||||||
or
|
or
|
||||||
.BR sigtimedwait ()).
|
.BR sigtimedwait ()).
|
||||||
|
@ -163,7 +166,7 @@ waiting for the same signal(s) in
|
||||||
or
|
or
|
||||||
.BR sigtimedwait (),
|
.BR sigtimedwait (),
|
||||||
then exactly one of the threads will actually receive the
|
then exactly one of the threads will actually receive the
|
||||||
signal if it is delivered to the process as a whole;
|
signal if it becomes pending for the process as a whole;
|
||||||
which of the threads receives the signal is indeterminate.
|
which of the threads receives the signal is indeterminate.
|
||||||
|
|
||||||
POSIX leaves the meaning of a NULL value for the
|
POSIX leaves the meaning of a NULL value for the
|
||||||
|
|
Loading…
Reference in New Issue