Repository navigation
Run Process.run through one worker on Bun and Node - #1831
Merged
Lorenzobattistela merged 2 commits intoOct 23, 2026
Merged
Lorenzobattistela merged 2 commits into
Lorenzobattistela merged 2 commits into
Conversation
Node's ChildProcess destroys proc.stdin when the child exits, so a descendant that inherited stdin got at most one pipe buffer of input. Hold stdin outside the ChildProcess and close it once the child has exited and stdout and stderr have closed, as the C lane does. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Lorenzobattistela
approved these changes
Oct 23, 2026
Merged
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.
Fixes #1468. Picks up the shared-worker direction from #1469, which was closed as stale.
Bun and Node use one
node:worker_threadsworker withchild_process.spawn. There is no separate Node fallback. A child can leave stdin unread; its descendants cannot keep the input pipe hanging after it exits. The combined output cap kills the child as the bytes arrive.Added the three stdin regressions from that review. Also checked the delayed
touchcase: cap 5 blocks the side effect, while the same script with a higher cap really creates the marker.Local checks: all 22 cases pass on Bun 1.4.3, Node 22.23.1, interpreted Bend and native C. The fork/join pipe-isolation case passes on all three runtimes. Repo gate: 54/54. No mini-cluster run.