Fixes the macOS timeout-group test so it no longer flakes on the kernel race where kill(-pgid, 0) returns EPERM instead of ESRCH. On macOS, a group that still exists but only holds exiting or exited-but-unreaped members answers EPERM — for example right after AFT reaps the group leader. The test now keeps polling while an EPERM group has no live libproc member, fails at once if a live member remains, and keeps the same 5-second deadline.
Bug Fixes
Adds await_group_exit and helpers that distinguish an EPERM group with only exiting members from one with a process still able to run.
Pins the wait behavior with three tests: outlasts EPERM from an unreaped member, reports a member never reaped by the deadline, and reports a live member at the deadline.
Adds a search descriptor for the timeout-group-eperm scenario in benchmarks/aft-search/slice-descriptors/land-timeout-group-eperm.json.
Confidence Score: 5/5
The PR appears safe to merge.
Summary
Updates macOS timeout tests to wait through EPERM while a process group contains only exited members.
Timeout-group checks now wait through unreaped macOS processes.