Merge 96a25bb3467b92c1c4d9e929dad41d11575cb203 into 78a117d5be3c4696f3a90518a13dfad68d994ea4

This commit is contained in:
Liam Mitchell 2026-03-21 13:36:10 +01:00 committed by GitHub
commit e2cea9c9db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -161,5 +161,13 @@ export function startElectron(root: string | undefined): ChildProcess {
const ps = spawn(electronPath, [entry].concat(args), { stdio: 'inherit' })
ps.on('close', process.exit)
for (const signal of ['SIGINT', 'SIGTERM', 'SIGUSR2'] as NodeJS.Signals[]) {
process.on(signal, () => {
if (!ps.killed) {
ps.kill(signal)
}
})
}
return ps
}