Bug 199215 - wait4(2) obsolete, but no replacement suggested
Summary: wait4(2) obsolete, but no replacement suggested
Status: RESOLVED CODE_FIX
Alias: None
Product: Documentation
Classification: Unclassified
Component: man-pages (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: documentation_man-pages@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-26 11:54 UTC by Martin Mares
Modified: 2018-04-01 03:02 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

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 ()

Note You need to log in before you can comment on or make changes to this bug.