Skip to content

Stop sandbox export children on SIGINT during startup - #10905

Merged
manzt merged 2 commits into
mainfrom
push-tslrqttzsxzr
Sep 18, 2026
Merged

manzt merged 2 commits into
mainfrom
push-tslrqttzsxzr

Conversation

@manzt

@manzt manzt commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

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

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
Copilot AI lite review requested due to automatic review settings September 18, 2026 18:28
@vercel

vercel Bot commented Sep 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
marimo-docs Ready Ready Preview Sep 18, 2026 6:44pm UTC

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@manzt manzt added the internal A refactor or improvement that is not user facing label Sep 18, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread marimo/_cli/export/_common.py
@manzt
manzt merged commit 176c01f into main Sep 18, 2026
47 checks passed
@manzt
manzt deleted the push-tslrqttzsxzr branch September 18, 2026 19:14

This branch was successfully deployed

1 active deployment
Preview 5d200dfd Deployed Sep 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal A refactor or improvement that is not user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants