test(subprocess): defer fake runner disconnect

This commit is contained in:
pku-xht committed 2026-08-27 02:37:00 +08:00
1 parent ef0815db7f
commit c302bedc3a
1 file changed
+3 -1
@@ -21,7 +21,9 @@ if (Number.isSafeInteger(configuredExit)) {
terminated = true
appendRunnerEvent(eventsPath, { type: 'exit', exitCode: 1, signal: null })
clearInterval(hold)
if (process.connected) process.disconnect()
setImmediate(() => {
if (process.connected) process.disconnect()
})
process.exitCode = 0
}
process.on('message', (message: unknown) => {