mirror of
https://github.com/openai/codex.git
synced 2026-08-30 14:19:08 +00:00
## Why Signaling an MCP server's process group can fail with `EPERM` on macOS, preventing owned descendants from being terminated. ## What changed - When a group signal is denied, enumerate the group's processes and signal members that still belong to the expected process group. - Apply the fallback to both `SIGTERM` and `SIGKILL` during MCP stdio server cleanup, while retaining the existing group signaling behavior elsewhere. - Reject invalid process group IDs and avoid signaling processes that have moved to another group. ## Testing Added macOS tests covering cleanup with a live or exited group leader, `SIGTERM`-resistant descendants, escalation to `SIGKILL`, and unsafe group IDs. GitOrigin-RevId: db722475b94dece74244ce8109b3e92f6cfb202a