Bug 199215

Summary: wait4(2) obsolete, but no replacement suggested
Product: Documentation Reporter: Martin Mares (mj)
Component: man-pagesAssignee: documentation_man-pages (documentation_man-pages)
Status: RESOLVED CODE_FIX    
Severity: normal CC: mtk.manpages
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:

Description Martin Mares 2018-03-26 11:54:26 UTC
The man page for wait4(2) tells that wait3() and wait4() are obsolete and it suggests using waitpid() and waitid() instead. However, the replacement functions do not allow to get rusage of the child.

Is there really a better function for that? If yes, wait4(2) should suggest it, if no, perhaps the note about obsolescence could be a little less strict.
Comment 1 Michael Kerrisk 2018-04-01 03:02:03 UTC
I take your point. There is no replacement function, so perhaps the text could be less strict. I applied the patch below.

Closing this report. Please reopen if you think the change is for some reason insufficient.

Thanks,

Michael

diff --git a/man2/wait4.2 b/man2/wait4.2
index 579c1c57d..d3941bb0d 100644
--- a/man2/wait4.2
+++ b/man2/wait4.2
@@ -67,11 +67,11 @@ Feature Test Macro Requirements for glibc (see
         _BSD_SOURCE
 .ad
 .SH DESCRIPTION
-These functions are obsolete; use
+These functions are nonstandard; in new programs, the use of
 .BR waitpid (2)
 or
 .BR waitid (2)
-in new programs.
+is preferable.
 .PP
 The
 .BR wait3 ()