fix(windows): let output readers own pipe cleanup - #111
Draft
Haloukaidi wants to merge 1 commit into
Draft
Conversation
lbx154
added a commit
that referenced
this pull request
Sep 8, 2026
Suspend providers before assignment; retain handles through cleanup and preserve explicit durable breakaway launchers. Reuse reviewed stdin and reader lifecycle corrections from PRs #110 and #111 to keep stop and watchdog paths reachable. Add native Windows ownership and PowerShell acceptance checks.
lbx154
added a commit
that referenced
this pull request
Sep 8, 2026
Suspend providers before assignment; retain handles through cleanup and preserve explicit durable breakaway launchers. Reuse reviewed stdin and reader lifecycle corrections from PRs #110 and #111 to keep stop and watchdog paths reachable. Add native Windows ownership and PowerShell acceptance checks.
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.
On Windows, closing a pipe descriptor from the main thread while another thread is blocked reading it can itself block. The reader join timeout is reached only after that close returns, so it does not bound cleanup when an independent child still holds the write end.
Give each output reader ownership of closing its stream. The caller stops retaining output and waits briefly; readers continue draining/discarding late output until the independent writer closes. Surface active read failures, and clean up the provider and any partially started readers when callbacks or thread startup fail.
Validation on Windows / Python 3.13:
git diff --checkpassed.Draft for lifecycle and cross-platform review. Descendant ownership is discussed separately in #106; this PR does not terminate independently owned work to manufacture EOF.