mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-26 11:12:53 +00:00
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.
18 lines
528 B
JavaScript
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;
|
|
}
|