Skip to content

fix(session): forward termination signals to running tasks - #863

Open
zamuwelle wants to merge 1 commit into
voidzero-dev:mainfrom
zamuwelle:fix/forward-termination-signals
Open

zamuwelle wants to merge 1 commit into
voidzero-dev:mainfrom
zamuwelle:fix/forward-termination-signals

Conversation

@zamuwelle

Copy link
Copy Markdown

Signals sent to the runner alone (kill , a supervisor, or docker stop) do not reach the task processes it started: the runner exits and the tasks keep running, holding ports and files. Ctrl-C in a terminal reaches them only because the terminal driver signals the whole foreground process group.

The session now forwards SIGINT, SIGTERM, and SIGHUP to the registered task processes and cancels the run's tokens, replacing the terminal Ctrl-C handler. The run ends through the regular wait paths once the tasks exit. Each spawned task process is registered while it runs, so a signal is never forwarded to a reused pid (fspy::TrackedChild now exposes the child pid).

Refs voidzero-dev/vite-plus#3090.

@zamuwelle
zamuwelle force-pushed the fix/forward-termination-signals branch from 9e2b64d to 617b698 Compare October 18, 2026 21:26
@wan9chi wan9chi self-assigned this Oct 19, 2026
Signals sent to the runner alone (kill <pid>, a supervisor, or docker stop)
do not reach the task processes it started: the runner exits and the tasks
keep running, holding ports and files. Ctrl-C in a terminal reaches them only
because the terminal driver signals the whole foreground process group.

The session now forwards SIGINT, SIGTERM, and SIGHUP to the registered task
processes and cancels the run's tokens, replacing the terminal Ctrl-C
handler. The run ends through the regular wait paths once the tasks exit.
Each spawned task process is registered while it runs, so a signal is never
forwarded to a reused pid (fspy::TrackedChild now exposes the child pid).

Refs voidzero-dev/vite-plus#3090.
@zamuwelle
zamuwelle force-pushed the fix/forward-termination-signals branch from 617b698 to 1f8c04c Compare October 19, 2026 05:34

This branch has not been deployed

No deployments
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