fix(desktop): shut down cleanly with workspace terminals (#3268)
Workspace terminal shutdown only signaled an npm wrapper, leaving Electron alive with broken output pipes. Make the signal-handling runner the terminal-owned process and route external Electron termination through the existing quit lifecycle.
This commit is contained in:
@@ -4,7 +4,11 @@ import path from "node:path";
|
||||
import { execFileSync, spawn } from "node:child_process";
|
||||
import { createRequire } from "node:module";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { createElectronSpawnOptions, resolveChildKillTarget } from "./dev-runner-config.mjs";
|
||||
import {
|
||||
createElectronSpawnOptions,
|
||||
registerDevRunnerShutdownSignals,
|
||||
resolveChildKillTarget,
|
||||
} from "./dev-runner-config.mjs";
|
||||
|
||||
import { resolveDevElectronArgs } from "./dev-runner-args.mjs";
|
||||
|
||||
@@ -159,8 +163,7 @@ function canConnect(port, host) {
|
||||
});
|
||||
}
|
||||
|
||||
process.on("SIGINT", () => stopAll("SIGTERM"));
|
||||
process.on("SIGTERM", () => stopAll("SIGTERM"));
|
||||
registerDevRunnerShutdownSignals({ signalSource: process, stop: stopAll });
|
||||
|
||||
spawnChild("metro", "npx", ["expo", "start", "--port", String(expoPort)], {
|
||||
cwd: appDir,
|
||||
|
||||
Reference in New Issue
Block a user