Skip to content

Raise on subprocesses terminated by signals - #4301

Open
Titus-von-Koeller wants to merge 4 commits into
huggingface:mainfrom
Titus-von-Koeller:fix-subprocess-signal-exits
Open

Titus-von-Koeller wants to merge 4 commits into
huggingface:mainfrom
Titus-von-Koeller:fix-subprocess-signal-exits

Conversation

@Titus-von-Koeller

@Titus-von-Koeller Titus-von-Koeller commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

execute_subprocess_async treats a signal-killed child as successful because it only raises for positive return codes. POSIX reports signal termination with a negative code. This raises for any nonzero exit status, preserving captured stderr and the existing exception type.

A real-child SIGTERM regression fails before the fix and passes after it on Python 3.10. It skips on non-POSIX systems.

Related: #4304 — enforce requested timeouts and clean up interrupted launches changes the same helper. The fixes can be merged independently.

Treat every nonzero exit status as failure. Add real-child regressions for success, ordinary failure and POSIX signal termination while preserving captured diagnostics.

Co-Authored-By: Codex <noreply@openai.com>
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Comment thread tests/test_testing.py Outdated
@Titus-von-Koeller
Titus-von-Koeller force-pushed the fix-subprocess-signal-exits branch from 7087b76 to 051314e Compare October 3, 2026 09:40
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.

3 participants