On macOS, killpg on a group whose processes are all exiting fails with
EPERM instead of ESRCH, which made alive(), close() and kill() raise and
end the batch. The SessionTests failure showed up on macOS runners.
Co-Authored-By: Claude Opus 5.5 <[email protected]>