From 00a1fbcfc46fa9f542dd4d689bf2d2f9b7274114 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Mon, 26 Nov 2012 05:25:00 +0100 Subject: [PATCH] wait.2: BUGS: Document odd waitid() behavior when 'infop' is NULL Signed-off-by: Michael Kerrisk --- man2/wait.2 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/man2/wait.2 b/man2/wait.2 index df015139b..7f466b88e 100644 --- a/man2/wait.2 +++ b/man2/wait.2 @@ -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),