Merge 96a25bb3467b92c1c4d9e929dad41d11575cb203 into ad50cba49561bf306604fc983f82e81a4eb1240c

This commit is contained in:
Liam Mitchell 2025-09-26 09:25:18 +08:00 committed by GitHub
commit 50acd56b16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -163,5 +163,13 @@ export function startElectron(root: string | undefined): ChildProcess {
const ps = spawn(electronPath, [entry].concat(args), { stdio: 'inherit' }) const ps = spawn(electronPath, [entry].concat(args), { stdio: 'inherit' })
ps.on('close', process.exit) 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 return ps
} }