fix(install-e2e): release inherited pipes after launcher exit
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user