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 <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
This commit is contained in:
1 parent
e1c33dcd33
commit
0763a35fbc
1 file changed
+5
@@ -455,6 +455,11 @@ export function runDevRunnerWithInput(input: DevRunnerCliInput) {
|
||||
stderr: "inherit",
|
||||
env,
|
||||
extendEnv: false,
|
||||
// Keep turbo in the same process group so terminal signals (Ctrl+C)
|
||||
// reach it directly. Effect defaults to detached: true on non-Windows,
|
||||
// which would put turbo in a new group and require manual forwarding.
|
||||
detached: false,
|
||||
forceKillAfter: "1500 millis",
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in new issue
Block a user