fix: preserve buffered Open3 pipe data before EOF - #1288
Merged
Conversation
fglock
marked this pull request as ready for review
September 7, 2026 20:06
Make ProcessInputHandle EOF synchronize with the asynchronous reader buffer instead of peeking the underlying stream. This prevents Open3 consumers from dropping buffered stdout and stderr or blocking while a child awaits stdin. Add regression coverage for buffered EOF, handler short-circuiting, stdin closure, and child reaping on both output pipes. Fixes #1263 Generated with [Codex](https://openai.com/codex/) Co-Authored-By: Codex <codex@openai.com>
Keep the #1263 buffered-pipe regression portable across Windows and Unix process pipes by accepting either LF or CRLF in child output assertions. Generated with [Codex](https://openai.com/codex/) Co-Authored-By: Codex <codex@openai.com>
Run the buffered-pipe regression through cmd.exe on Windows instead of a Unix shell command, so the stdin-to-stdout/stderr lifecycle is exercised reliably on both CI platforms. Generated with [Codex](https://openai.com/codex/) Co-Authored-By: Codex <codex@openai.com>
fglock
force-pushed
the
fix/issue-1263
branch
from
September 8, 2026 06:35
78c3c28 to
6605752
Compare
Keep #1263 process-pipe regression portable while retaining proof that the Windows child emitted buffered stderr data. Generated with [Codex](https://openai.com/codex/) Co-Authored-By: Codex <codex@openai.com>
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
ProcessInputHandle::eofconsult the synchronized reader buffer rather than peek the Java input streamFixes #1263.
Validation
prove src/test/resources/unit/ipc_open3_buffered_eof.t(system Perl)timeout 60 ./jperl src/test/resources/unit/ipc_open3_buffered_eof.ttimeout 60 ./jperl --interpreter src/test/resources/unit/ipc_open3_buffered_eof.tmakemake check-linksGenerated with Codex