fix(child_process): support stream-backed stdio#4401
Merged
proggeramlug merged 3 commits intoJun 4, 2026
Merged
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.
Summary
fs.ReadStream/fs.WriteStreamentries in child_processstdioarrays and route them through the existing fd-backed stdio path.nullwhile bytes go to the supplied files.spawn/forkand syncspawnSync/execSync/execFileSyncstream-backed stdio.Issue Cluster
Refs #2555.
Refs #2130.
This is batched as one slice because async spawn/fork and sync helpers share
cp_read_stdio, and the implementation can reuse the existing fd routing path once fs stream objects are normalized to registered fds.Validation
CARGO_TARGET_DIR=/tmp/perry-child-stream-stdio-check cargo check -p perry-runtimecargo build -p perry-runtime -p perry --releasecargo fmt -p perry-runtime -- --checkgit diff --checkgit diff --cached --check./scripts/check_file_size.shjq empty test-parity/known_failures.jsonPATH=/root/.npm/_npx/bac97da9607b7ef2/node_modules/node/bin:$PATH PERRY_NO_AUTO_OPTIMIZE=1 PERRY_NO_CACHE=1 ./run_parity_tests.sh --suite node-suite --module child_process --filter stdio-streamstdio-fd,stdio-ignore,stdio-inherit,spawn-sync-stdio,child_process/sync/sync-stdioNote:
cargo fmt --all -- --checkcurrently reports an unrelated formatting diff incrates/perry-stdlib/src/webcrypto/jwk.rs:494; this PR keeps that file untouched and uses the package-scopedperry-runtimeformat check for the touched Rust code.Non-Goals