Wait status is total
The pid side is superseded by one-reaper-one-fold:
waitpid_eintr,try_waitpid_eintr,wait_blocking_eintr, andclassify_wait_statusgo withRunningChild::wait’s last poll loop, folded into the reaper’s ownwaitid/WNOWAITscan andblocking_reap— one funnel now, not a pid door beside it.waitpgid_eintr/try_waitpgid_eintr, unreferenced since job control left, go too. The pgid side is untouched:Pgidstill admits only positive identifiers, andPgid::signal_groupstill sends bykill(-pgid, …)with no wait behind it.
Unix wait results remain typed without ceasing to be total: rustix’s
transparent WaitStatus carries every kernel status, while one retrying funnel
makes EINTR unobservable to lifecycle code.
Decision
- Blocking and polling are different doors.
waitpid_eintr/waitpgid_eintrreturnResult<(Pid, WaitStatus), Errno>;try_waitpid_eintr/try_waitpgid_eintralone returnOption. The doors ownNOHANG, so an impossible idle result cannot leak into a blocking caller. - The doors retry
EINTRinternally. A signal delivery therefore cannot look likeECHILDand erase a live job. - Consumers classify through
WaitStatus’s bit-test accessors. Unclassifiable and continued statuses retain their raw code where the surrounding outcome vocabulary has no dedicated case. - Process and process-group waits are distinct functions; callers never encode
a process group by negating an integer pid.
Pgiditself admits only positive identifiers, so the conversion to rustix’sPidis proved once by the type.
Rejected shape
nix::sys::wait::WaitStatus is a fallible enum conversion, not a total view of
the kernel word. Its decode can reject real-time terminating signals, and an
internal assertion gives an unfamiliar status a panic path. A shell’s reaper
must accept every status the kernel can produce; rustix’s transparent wrapper
preserves that law.
Consequences
ral/src/jobs.rscontains neitherlibcflags norWIF*decoding.- The raw
(pid, status)sentinel convention disappears fromcore/src/process/signal/unix.rs. - Error rendering is unchanged: rustix
Errnoconverts to the same OS error text at the existingstd::io::Resultboundary.
See process.