mirror of
https://github.com/openai/codex.git
synced 2026-09-09 15:58:47 +00:00
## Why Shell startup code that accesses the controlling terminal can stop a hook on background terminal I/O, preventing the hook command from running. ## What changed Use `detach_from_tty` before executing Unix hook commands to avoid inheriting the controlling terminal while preserving process-group cleanup. ## Testing Add a Unix regression test that runs under a controlling terminal and uses `BASH_ENV` to invoke `stty` during shell startup. Verify that the hook completes successfully and produces the expected output. GitOrigin-RevId: 231125d4b169fb1bd828e3f8e96476a13bd25d26