Skip to content

doc: fix stdin/stdout stream direction description in child_process#62175

Closed
sehrishanam1 wants to merge 1 commit intonodejs:mainfrom
sehrishanam1:my-branch
Closed

doc: fix stdin/stdout stream direction description in child_process#62175
sehrishanam1 wants to merge 1 commit intonodejs:mainfrom
sehrishanam1:my-branch

Conversation

@sehrishanam1
Copy link

Fixes #56623

The documentation incorrectly described stdin as writable and
stdout/stderr as readable. This fixes the swapped terms to correctly
state that stdin is readable and stdout/stderr are writable.

Also fixed the example in the same paragraph which had the same
mix-up.

@nodejs-github-bot nodejs-github-bot added child_process Issues and PRs related to the child_process subsystem. doc Issues and PRs related to the documentations. labels Mar 10, 2026
@sehrishanam1
Copy link
Author

After further investigation and actually testing the behavior, I need to close this PR.

I misunderstood the stream directions from the parent process perspective:

  • child.stdin is Writable ✅ — the parent writes to the child's input
  • child.stdout / child.stderr are Readable ✅ — the parent reads from the child's output

The original documentation was correct. My change introduced incorrect information. Closing this PR to avoid confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

child_process Issues and PRs related to the child_process subsystem. doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mixing with stdin and stderr stdout about readable or writable in Child process spawn API options.stdio doc

2 participants