wait.2: BUGS: Document odd waitid() behavior when 'infop' is NULL

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2012-11-26 05:25:00 +01:00
parent 1113a8fcc1
commit 00a1fbcfc4
1 changed files with 15 additions and 0 deletions

View File

@ -602,6 +602,21 @@ main(int argc, char *argv[])
}
}
.fi
.SH BUGS
According to POSIX.1-2008, an application calling
.BR waitid ()
must ensure that
.I infop
points to a
.I siginfo_t
structure (i.e., that it is a non-NULL pointer).
On Linux, if
.I infop
is NULL,
.BR waitid ()
succeeds, and returns the process ID of the waited-for child.
Applications should avoid relying on this inconsistent,
nonstandard, and unnecessary feature.
.SH "SEE ALSO"
.BR _exit (2),
.BR clone (2),