Thread (4 messages) 4 messages, 4 authors, 2021-07-13

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

flat view

From: Jakub Wilk <hidden>
Date: 2021-07-12 16:28:06

* Richard Palethorpe [off-list ref], 2021-07-08, 11:08:
Please see upstream commit:

commit dd83c161fbcc5d8be637ab159c0de015cbff5ba4
Author: zhongjiang [off-list ref]
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.
That sounds like a bug in the kernel, though?

POSIX says the error should be ECHILD if "the process group specified by pid does not exist".

-- 
Jakub Wilk
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help