fix(pty): close master after child exit#519
Merged
Merged
Conversation
Member
Author
|
Verified on Namespace Windows Server 2022 build 20348 in CI run 28994689990:
The remaining immediate default-shard failures are the separately documented milestone screen-ordering issue. The temporary Namespace runner change has been removed from the PR. |
Co-authored-by: GPT-5.6 <codex@openai.com>
Co-authored-by: GPT-5.6 <codex@openai.com>
Co-authored-by: GPT-5.6 <codex@openai.com>
wan9chi
force-pushed
the
fix/conpty-eof-deadlock
branch
from
July 9, 2026 04:55
570c62b to
c87d310
Compare
Member
Author
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.

Summary
Motivation
Before Windows build 26100,
ClosePseudoConsolecan wait indefinitely unless its output pipe is drained concurrently. The current ownership cycle keeps the pseudoconsole handle inPtyWriterwhilePtyReaderwaits for EOF, causing direct PTY tests and the E2E harness to time out on Windows Server 2022 build 20348. Moving master teardown to the existing child-monitor thread follows Microsoft’s required close-and-drain ordering without truncating output.