authorgravatar for electricvoxel@gmail.comHwanseo Choi <electricvoxel@gmail.com> 2026-03-07 19:20:17+09:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-03-07 02:20:17-08:00
log0763a35fbc60d6209209a5545ab64e1631f43d48
tree3b927cc7521fa96f48b602f9772b5a108ae636f0
parente1c33dcd33949c18eb30986ba513c1334064677c
signature Signed by PGP key B5690EEEBB952194

Fix `bun run dev:desktop` from not terminating properly on SIGINT/SIGTERM/SIGHUP (#305)

* fix: handle turbo shutdown in dev runner * refactor: rely on effect child process shutdown * refactor: inline turbo shutdown timeout * add back sigint sigterm sighup handling * refactor: tighten turbo signal forwarding * refactor: inline dev runner errors * fix: use detached false instead of manual signal forwarding Effect defaults to detached: true on non-Windows, putting turbo in a new process group where terminal signals (Ctrl+C) never reach it. Setting detached: false keeps turbo in the same group, eliminating the need for ~130 lines of manual signal forwarding. * Update scripts/dev-runner.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

1 files changed, 5 insertions(+), 0 deletions(-)

scripts/dev-runner.ts+5
......@@ -455,6 +455,11 @@ export function runDevRunnerWithInput(input: DevRunnerCliInput) {
455455 stderr: "inherit",
456456 env,
457457 extendEnv: false,
458 // Keep turbo in the same process group so terminal signals (Ctrl+C)
459 // reach it directly. Effect defaults to detached: true on non-Windows,
460 // which would put turbo in a new group and require manual forwarding.
461 detached: false,
462 forceKillAfter: "1500 millis",
458463 },
459464 );
460465