* 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