Fall back to per-process MCP cleanup on macOS - #37068
Merged
copyberry[bot] merged 1 commit intoAug 5, 2026
Merged
Conversation
## 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
Contributor
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/db722475b94dece74244ce8109b3e92f6cfb202a
branch
from
August 5, 2026 09:44
a55e408 to
f2d8255
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/db722475b94dece74244ce8109b3e92f6cfb202a
branch
August 5, 2026 09:45
zhangzhenguo-it
temporarily deployed
to
issue-triage
August 5, 2026 09:48 — with
GitHub Actions
Inactive
zhangzhenguo-it
temporarily deployed
to
issue-triage
August 5, 2026 09:48 — with
GitHub Actions
Inactive
zhangzhenguo-it
temporarily deployed
to
issue-triage
August 5, 2026 09:48 — with
GitHub Actions
Inactive
hepengwang12-tech
temporarily deployed
to
issue-triage
August 5, 2026 09:53 — with
GitHub Actions
Inactive
hepengwang12-tech
temporarily deployed
to
issue-triage
August 5, 2026 09:53 — with
GitHub Actions
Inactive
hepengwang12-tech
temporarily deployed
to
issue-triage
August 5, 2026 09:53 — with
GitHub Actions
Inactive
wukangcheng2944
temporarily deployed
to
issue-triage
August 5, 2026 10:18 — with
GitHub Actions
Inactive
wukangcheng2944
temporarily deployed
to
issue-triage
August 5, 2026 10:18 — with
GitHub Actions
Inactive
wukangcheng2944
temporarily deployed
to
issue-triage
August 5, 2026 10:18 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:12 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:12 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:12 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:12 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:12 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:12 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:12 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:12 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:12 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:12 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:12 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:12 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:12 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:12 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:12 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:12 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:12 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:12 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:13 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:13 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:13 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:13 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:13 — with
GitHub Actions
Inactive
scadastrangelove
temporarily deployed
to
issue-triage
August 5, 2026 11:13 — with
GitHub Actions
Inactive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fall back to per-process MCP cleanup on macOS
Why
Signaling an MCP server's process group can fail with
EPERMon macOS,preventing owned descendants from being terminated.
What changed
members that still belong to the expected process group.
SIGTERMandSIGKILLduring MCP stdio servercleanup, while retaining the existing group signaling behavior elsewhere.
moved to another group.
Testing
Added macOS tests covering cleanup with a live or exited group leader,
SIGTERM-resistant descendants, escalation toSIGKILL, and unsafe group IDs.