mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## Why Unix control-socket shutdown removes the socket and rendezvous link but leaves the startup lock file behind. ## What changed Keep a removable startup lock with the control-socket guard and release the lock after publishing the rendezvous link. On cleanup, reacquire the lock and verify that the path still identifies the same file before removing it. Use nonblocking acquisition with asynchronous retries, checking file identity after acquisition to handle lock-file replacement. ## Testing Add tests for nonblocking lock contention and dangling symlink rejection, and extend the control-socket lifecycle test to verify that the lock file is removed on shutdown. GitOrigin-RevId: 469ed5269f32ae1c0655d40d28519ef5e94ba6be