Stop sandbox export children on SIGINT during startup - #10905
Merged
Merged
Conversation
Apparently Python 3.10 raises KeyboardInterrupt synchronously, so there is a race where SIGINT can interrupt `Popen` after the child starts but before the caller receives its handle, leaving it running. These changes defer the default SIGINT handler until subprocess ownership is established on Python 3.10. The asyncio and custom handlers are preserved as well as Click interrupt behavior. Also extends the process-creation regression test to cover SIGINT. Closes MO-7692
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved blocking issues were identified.
Pull request overview
Prevents sandbox export subprocesses from being orphaned when SIGINT occurs during startup while preserving existing signal-handling behavior.
Changes:
- Defers default SIGINT handling until subprocess ownership is established.
- Preserves asyncio, custom, and Click interrupt behavior.
- Adds SIGINT regression coverage.
File summaries
| File | Description |
|---|---|
tests/_cli/test_export_subprocess.py |
Adds SIGINT process-creation and cleanup regression tests. |
marimo/_cli/export/_common.py |
Defers SIGINT during subprocess startup and restores cleanup behavior. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
This branch was successfully deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Apparently Python 3.10 raises KeyboardInterrupt synchronously, so there is a race where SIGINT can interrupt
Popenafter the child starts but before the caller receives its handle, leaving it running.These changes defer the default SIGINT handler until subprocess ownership is established on Python 3.10. The asyncio and custom handlers are preserved as well as Click interrupt behavior.
Also extends the process-creation regression test to cover SIGINT.
Closes MO-7692