[codex] honor child_process numeric stdio fds#4284
Merged
proggeramlug merged 1 commit intoJun 4, 2026
Merged
Conversation
This was referenced Jun 3, 2026
9bbacf6 to
3824ca0
Compare
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
This adds live
child_processsupport for numeric fd entries inspawn()andfork()stdio arrays. Valid fd entries are routed to duplicated parent file descriptors, while the JS-visiblestdin/stdout/stderrproperties andchild.stdio[]slots match Node by exposingnullfor those entries.The change also parses array stdio forms before string forms so mixed arrays such as
["ignore", outFd, errFd]are not accidentally interpreted as strings, and keeps fork IPC behavior intact for["ignore", outFd, errFd, "ipc"].Non-goals for this slice: custom stream handles, invalid-fd validation/error shape, sync stdio fd forms, numeric stdin coverage, AbortSignal/killSignal timeout behavior, uid/gid, detached/platform flags, and broad option validation.
Validation
npm exec --yes --package=node@26 -- node --experimental-strip-types test-parity/node-suite/child_process/async/stdio-fd.tsPERRY_NO_AUTO_OPTIMIZE=1 npm exec --yes --package=node@26 -- bash -lc './run_parity_tests.sh --suite node-suite --module child_process --filter stdio-fd'PERRY_NO_AUTO_OPTIMIZE=1 npm exec --yes --package=node@26 -- bash -lc './run_parity_tests.sh --suite node-suite --module child_process --filter stdio-ignore'PERRY_NO_AUTO_OPTIMIZE=1 npm exec --yes --package=node@26 -- bash -lc './run_parity_tests.sh --suite node-suite --module child_process --filter stdio-inherit'PERRY_NO_AUTO_OPTIMIZE=1 npm exec --yes --package=node@26 -- bash -lc './run_parity_tests.sh --suite node-suite --module child_process'(18/18)cargo fmt --all -- --checkgit diff --check./scripts/check_file_size.shCARGO_TARGET_DIR=/tmp/perry-child-stdio-fd-check cargo check -p perry-runtime(passes with existing warnings)