From d8b13fb4d939978f02db3d49697cbccff2881a30 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Wed, 4 Sep 2013 15:06:22 +0200 Subject: [PATCH] wait.2: Add details on the fifth argument provided by raw waitid() system call See https://bugzilla.kernel.org/show_bug.cgi?id=60744 Reported-by: Hannes Landeholm Signed-off-by: Michael Kerrisk --- man2/wait.2 | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/man2/wait.2 b/man2/wait.2 index 590821472..5c39f8a56 100644 --- a/man2/wait.2 +++ b/man2/wait.2 @@ -46,7 +46,7 @@ .\" 2005-05-10, mtk, __W* flags can't be used with waitid() .\" 2008-07-04, mtk, removed erroneous text about SA_NOCLDSTOP .\" -.TH WAIT 2 2012-12-21 "Linux" "Linux Programmer's Manual" +.TH WAIT 2 2013-09-04 "Linux" "Linux Programmer's Manual" .SH NAME wait, waitpid, waitid \- wait for process to change state .SH SYNOPSIS @@ -60,6 +60,8 @@ wait, waitpid, waitid \- wait for process to change state .BI "int waitid(idtype_t " idtype ", id_t " id \ ", siginfo_t *" infop ", int " options ); + /* This is the glibc and POSIX interface; see + NOTES for information on the raw system call. */ .sp .in -4n Feature Test Macro Requirements for glibc (see @@ -518,6 +520,18 @@ type ("clone" or "non-clone"). Do not wait for children of other threads in the same thread group. This was the default before Linux 2.4. +.PP +The raw +.BR waitid () +system call takes a fith argument, of type +.IR "struct rusage\ *" . +If this argument is non-NULL, +then it is used to return resource usage information about the child, +in the same manner as +.BR wait4 (2). +See +.BR getrusage (2) +for details. .SH BUGS According to POSIX.1-2008, an application calling .BR waitid ()