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:
@@ -15,3 +15,9 @@ export function createElectronSpawnOptions({ env, colorEnv, expoDevUrl }) {
|
||||
export function resolveChildKillTarget(pid, detached) {
|
||||
return detached ? -pid : pid;
|
||||
}
|
||||
|
||||
export function registerDevRunnerShutdownSignals({ signalSource, stop }) {
|
||||
for (const signal of ["SIGHUP", "SIGINT", "SIGTERM"]) {
|
||||
signalSource.on(signal, () => stop("SIGTERM"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user