Skip to content

Conversation

@seeekr
Copy link
Contributor

@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
Contributor 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
Contributor 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
@etraut-openai
Copy link
Collaborator

@codex review

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. Breezy!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@etraut-openai etraut-openai merged commit 9ce6bbc into openai:main Jan 8, 2026
26 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 8, 2026
@etraut-openai
Copy link
Collaborator

@seeekr, thanks for the contribution!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants