electron: more robust sidecar kill handling (#18742)

This commit is contained in:
Brendan Allan
2026-03-23 08:44:23 +00:00
committed by GitHub
parent 0f5626d2e4
commit 4c27e7fc64
2 changed files with 20 additions and 1 deletions
+2 -1
View File
@@ -35,6 +35,7 @@ export type CommandEvent =
export type SqliteMigrationProgress = { type: "InProgress"; value: number } | { type: "Done" }
export type CommandChild = {
pid: number | undefined
kill: () => void
}
@@ -191,7 +192,7 @@ export function spawnCommand(args: string, extraEnv: Record<string, string>) {
treeKill(child.pid)
}
return { events, child: { kill }, exit }
return { events, child: { pid: child.pid, kill }, exit }
}
function handleSqliteProgress(events: EventEmitter, line: string) {