Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(background-terminals): retain live children after signal errors
Fixes #591.
Problem
An
errorevent does not always mean a child failed to start or has exited. A failed signal can emit it after spawning. The background manager previously classified that as terminal failure, flushed/closed full-log streams and published completion while the actual process was still alive. Its one-shot error listener also disappeared after that first event.Value
Keep background-terminal status and completion evidence aligned with the real child lifecycle, including output produced after a failed signal. Avoid leaving repeated operational errors unobserved.
Approach
Validation
bun run check(contracts, web build/typecheck, formatting, lint, repository typecheck).alive=true, status=failed, error listeners=0toalive=true, status=running, error listeners=1.The signal failure is deliberately injected at Node's native kill binding. The test invokes the real ChildProcess.kill method and verifies the actual child is still alive; it is not a naturally occurring OS-denial E2E.
Full-suite limitation: an initial broader test filter also selected the existing Windows descendant-tree taskkill test, which failed its
result.killedassertion on this host. Its owned processes were cleaned up, and the final focused run excludes that real-tree test. This PR does not alter taskkill timeouts/fallback policy or claim the entire suite passed.Impact