Re: [PATCH] wait.2: Add ESRCH for when pid == INT_MIN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Richard,

On 7/8/21 12:08 PM, Richard Palethorpe wrote:
> Please see upstream commit:
> 
>  commit dd83c161fbcc5d8be637ab159c0de015cbff5ba4
>  Author: zhongjiang <zhongjiang@xxxxxxxxxx>
>  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@xxxxxxxx>

Patch applied.

Thanks,

Alex

> ---
>  man2/wait.2 | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/man2/wait.2 b/man2/wait.2
> index 5ae955b3f..63d872ee6 100644
> --- a/man2/wait.2
> +++ b/man2/wait.2
> @@ -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
> 

-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux