Skip to content

Commit ebbaa91

Browse files
fix(desktop): prevent orphaned dev processes after Ctrl-C (anomalyco#1694)
Remove detached:true from the Vite and Electron child process spawns in electron-dev.mjs. Detached processes form a separate process group and do not receive terminal SIGINT, so they survive Ctrl-C and keep logging to the terminal.
1 parent 59d4d02 commit ebbaa91

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

‎apps/desktop/scripts/electron-dev.mjs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ if (!viteReady) {
218218
if (!viteReady) {
219219
uiChild = run(pnpmCmd, ["-w", "dev:ui"], {
220220
cwd: repoRoot,
221-
detached: process.platform !== "win32",
222221
env: {
223222
...process.env,
224223
PORT: String(devPort),
@@ -239,7 +238,6 @@ const cdpPort = cdpPortRaw === "" || cdpPortRaw === "0" ? "" : cdpPortRaw;
239238

240239
electronChild = run(pnpmCmd, ["exec", "electron", "./electron/main.mjs"], {
241240
cwd: desktopRoot,
242-
detached: process.platform !== "win32",
243241
env: {
244242
...process.env,
245243
OPENWORK_DEV_MODE: process.env.OPENWORK_DEV_MODE ?? "1",

0 commit comments

Comments
 (0)