mirror of
https://github.com/openai/codex.git
synced 2026-10-29 19:08:43 +00:00
## Why A concurrent fork can inherit a PID reservation probe's file descriptor and keep its lock held after the probe closes it, making a stale reservation appear active. ## What changed Add a drop guard that explicitly unlocks empty PID reservation probes on Unix, including when inspection fails or is cancelled. ## Testing Extend the duplicated-handle regression test to cover empty PID files, read errors, and cancellation alongside missing PID files. Verify that cancellation occurs while the lock is held and that subsequent status checks do not report an active reservation. GitOrigin-RevId: 793569c9bcaca02900662a66c33aa48f2bebfd5e