Skip to content

Jupyter: Acknowledge SIGINT without exiting#498

Merged
georgestagg merged 1 commit into
mainfrom
jupyter/ack-sigint
Jul 2, 2026
Merged

Jupyter: Acknowledge SIGINT without exiting#498
georgestagg merged 1 commit into
mainfrom
jupyter/ack-sigint

Conversation

@georgestagg

Copy link
Copy Markdown
Collaborator

In the Jupyter kernel, we use interrupt_mode: "signal", so the frontend sends SIGINT to interrupt a running cell, not to exit.

Previously, we quit on SIGINT, leading to interrupts killing the kernel:

Screenshot 2026-07-01 at 09 00 30

With this change we handle the SIGINT by immediately acknowledging we are idle and then continue running, so sending Ctrl-C in Positron acts as expected.

Screenshot 2026-07-01 at 08 59 49

Shutting down and restarting the kernel still works, because that uses a different mechanism.

In the future, we will likely switch to asynchronous cell execution. At that point we should cancel any in-flight async requests before acknowledging we are idle.

@georgestagg georgestagg requested a review from thomasp85 July 1, 2026 08:08

@thomasp85 thomasp85 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@georgestagg georgestagg merged commit b6201e7 into main Jul 2, 2026
2 checks passed
@georgestagg georgestagg deleted the jupyter/ack-sigint branch July 2, 2026 13:57
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.

2 participants