Skip to content

Conversation

@seeekr
Copy link

@seeekr seeekr commented Jan 2, 2026

Summary

  • avoid setting a new process group when stdio is inherited (keeps child in foreground PG)
  • keep process-group isolation when stdio is redirected so killpg cleanup still works
  • prevents macOS job-control SIGTTIN stops that look like hangs after output

Testing

  • cargo build -p codex-cli
  • GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_NOSYSTEM=1 CARGO_BIN_EXE_codex=/Users/denis/Code/codex/codex-rs/target/debug/codex /opt/homebrew/bin/timeout 30m cargo test -p codex-core -p codex-exec

Context

This fixes macOS sandbox hangs for commands like elixir -v / erl -noshell, where the child was moved into a new process group while still attached to the controlling TTY. See issue #8690.

Authorship & collaboration

  • This change and analysis were authored by Codex (AI coding agent).
  • Human collaborator: @seeekr provided repro environment, context, and review guidance.
  • CLI used: codex-cli 0.77.0.
  • Model: gpt-5.2-codex (xhigh).

@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@seeekr
Copy link
Author

seeekr commented Jan 2, 2026

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Jan 2, 2026
@seeekr
Copy link
Author

seeekr commented Jan 2, 2026

hey there -- ran into this issue while having Codex build some Elixir code for me. I'm not an expert in the core of the potential issue here, but problem + solution look reasonable to me, so I had Codex whip up this PR. Hope it's useful! Happy to hear feedback if not!

@seeekr seeekr marked this pull request as ready for review January 2, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant