fix(install-e2e): release inherited pipes after launcher exit

This commit is contained in:
ethernet
2026-09-06 22:01:46 -04:00
parent 39b5ea6d0a
commit 03a6ae049e
2 changed files with 12 additions and 2 deletions
@@ -6,6 +6,13 @@ function observeProcessClose(child) {
closed = true
resolve()
}))
// Windows descendants can inherit pipe handles and postpone 'close' after
// the launch process exits. Release our handles, never kill descendants.
const releasePipes = () => {
for (const stream of child.stdio) stream?.destroy()
}
child.once('exit', releasePipes)
if (child.exitCode !== null || child.signalCode !== null) releasePipes()
return async function waitForClose(timeoutMs = 120_000) {
if (closed) return
let timer