The errno-to-state MAPPING, split out from the syscall so it can be tested exhaustively without
an environment in the loop. The whole contract turns on one rule: only an actual ESRCH proves a
process gone. EPERM (it exists, it is just another user's, so the caller cannot signal it) is
ALIVE. Anything else - argument/range errors, unfamiliar errnos, a missing code - is UNKNOWN,
never dead.
The errno-to-state MAPPING, split out from the syscall so it can be tested exhaustively without an environment in the loop. The whole contract turns on one rule: only an actual
ESRCHproves a process gone.EPERM(it exists, it is just another user's, so the caller cannot signal it) is ALIVE. Anything else - argument/range errors, unfamiliar errnos, a missing code - is UNKNOWN, never dead.