]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
wait.2: Add ESRCH for when pid == INT_MIN
authorRichard Palethorpe <rpalethorpe@suse.com>
Wed, 28 Jul 2021 20:19:56 +0000 (22:19 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Sat, 7 Aug 2021 23:02:32 +0000 (01:02 +0200)
Please see upstream commit:

 commit dd83c161fbcc5d8be637ab159c0de015cbff5ba4
 Author: zhongjiang <zhongjiang@huawei.com>
 Date:   Mon Jul 10 15:53:01 2017 -0700

     kernel/exit.c: avoid undefined behaviour when calling wait4()

It avoids negating INT_MIN by returning early with ESRCH.

Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/wait.2

index 5ae955b3fdce6d46b43863833a1082f6c91d3a6b..63d872ee63ad1ee8e1acd70f7d7648ce0da76429 100644 (file)
@@ -455,6 +455,15 @@ was caught; see
 The
 .I options
 argument was invalid.
+.TP
+.B ESRCH
+(for
+.BR wait ()
+or
+.BR waitpid ())
+.I pid
+is equal to
+.I INT_MIN
 .SH CONFORMING TO
 SVr4, 4.3BSD, POSIX.1-2001.
 .SH NOTES