fix(core): release exited shell execution state (#46058)

This commit is contained in:
Luke Parker 2026-08-29 13:08:50 +10:00 committed by GitHub
parent e3bda5e2d0
commit 51a082cea3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -369,9 +369,11 @@ const layer = () =>
if (!oldest) break
yield* removeCommand(oldest)
}
// Cancel a pending timeout once the command exits on its own. Interrupting last avoids
// aborting finish when finish itself runs on the timeout fiber.
if (command.timeoutFiber) yield* Fiber.interrupt(command.timeoutFiber)
// Keep exited history data-only. Interrupt last because finish may run on the timeout fiber.
const timeoutFiber = command.timeoutFiber
command.timeout = undefined
command.timeoutFiber = undefined
if (timeoutFiber) yield* Fiber.interrupt(timeoutFiber)
})
command.timeout = (duration) =>