Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion apps/backend/src/pi/process-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ export function runProcess(options: RunOptions): Promise<RunResult> {
if (options.processGroup && process.platform === 'win32' && child.pid && child.exitCode === null) spawnSync('taskkill', ['/PID', String(child.pid), '/T', '/F'], { stdio: 'ignore', windowsHide: true });
else if (grouped && child.pid) process.kill(-child.pid, signal);
else child.kill(signal);
} catch (error) { if ((error as NodeJS.ErrnoException).code !== 'ESRCH') throw error; }
} catch (error) {
// ESRCH: nothing left to signal. EPERM: what macOS answers for a group whose leader is already gone (the SIGKILL after `close` lands there); nothing left either.
const code = (error as NodeJS.ErrnoException).code;
if (code !== 'ESRCH' && code !== 'EPERM') throw error;
}
};
const abort = (): void => {
cancelled = true;
Expand Down
Loading