You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vp run: on Ctrl+C, the first task to exit with 130 makes vp SIGKILL the others mid-cleanup, orphaning their children #3581
With vp run --parallel (and -r), pressing Ctrl+C sends SIGINT to every task. Most tools exit with 130 on SIGINT. vp run treats that 130 as a failure and cancels the run, and cancellation SIGKILLs the tasks that are still shutting down. A task that needs a moment to clean up never gets it.
This bites hardest with tools that put their own child in a separate process group and stop it from their signal handler, like portless (detached: true so it can kill the whole group on Ctrl+C). When portless is SIGKILLed mid-shutdown, the dev server it started is orphaned and keeps running on the terminal. In our monorepo, tsx watch/vpx --watch for the API survives and keeps reading stdin, so pressing Enter later reruns the server and prints into the shell. The same happens when any task fails for a real reason while the others are running (see voidzero-dev/vite-task#822).
Minimal repro
Two packages, run with vp run --parallel -r dev, then Ctrl+C:
a/run.sh (exits 130 on SIGINT, like most CLIs):
#!/bin/shtrap'echo "a got INT, exit 130" >> log; exit 130' INT
while:;do sleep 0.2;done
b/run.sh (needs 2 s to clean up):
#!/bin/shforsin INT TERM HUP;dotrap"echo 'b got $s, cleaning up 2s' >> log; sleep 2; echo 'b clean exit' >> log; exit 0"$s;donewhile:;do sleep 0.2;done
Log after Ctrl+C:
b got INT, cleaning up 2s
a got INT, exit 130
b clean exit never appears: b is killed during its cleanup. Same if a exits 1 on its own without Ctrl+C: b receives no catchable signal at all (its INT/TERM/HUP traps never run), so it was SIGKILLed.
Repro run on Vite+ 1.6.0 and 1.8.0 on Linux; the orphaned dev server is what we hit day to day on macOS.
Expected
When the run was interrupted by the user (SIGINT/SIGTERM/SIGHUP to vp), a task exiting 130/143/129 is the normal answer to that signal, not a failure that cancels siblings. Let every task finish its own shutdown.
When cancelling siblings after a real failure, send SIGTERM (to the task's process group) first and SIGKILL only after a grace period, so tools can stop what they started.
Activity
ViktorRingnes commentedon Nov 26, 2026
I'd like to work on this if no one else is 🙂