Files
paseo/packages/desktop/scripts/dev-runner-config.mjs
T
Mohamed Boudra d17194c611 fix(desktop): stop dev app surviving its terminal
Electron was detached from the desktop runner, allowing it to outlive a stopped workspace terminal with broken output pipes and retain the single-instance lock. Keep Electron owned by the runner and preserve explicit process-group cleanup for detached child trees.
2026-07-31 17:17:54 +02:00

18 lines
528 B
JavaScript

export function createElectronSpawnOptions({ env, colorEnv, expoDevUrl }) {
return {
// Electron must stay in the runner's process group. Paseo workspace scripts
// own the terminal process group, so detaching Electron lets it survive a
// service stop with broken stdout/stderr pipes and block the next launch.
detached: false,
env: {
...env,
...colorEnv,
EXPO_DEV_URL: expoDevUrl,
},
};
}
export function resolveChildKillTarget(pid, detached) {
return detached ? -pid : pid;
}