Skip to content

Conversation

nglgzz
Copy link
Contributor

@nglgzz nglgzz commented Oct 3, 2025

This note on options.stdio mentions that it's not recommended to pass stdin as a writable stream and stdout/stderr as readable, but then proceeds to say to always check that stdin is writable and stdout/stderr are readable.

Going by the examples and the fact that process.stdin is readable and process.stdout/process.stderr are writable, I'm assuming that the types in the recommendation got swapped.

This note on `options.stdio` mentions that it's not recommended to pass
`stdin` as a writable stream and `stdout/stderr` as readable, but then
proceeds to say to always check that `stdin` is writable and
`stdout/stderr` are readable.

Going by the examples and the fact that `process.stdin` is readable and
`process.stdout/process.stderr` are writable, I'm assuming that the
types in the recommendation got swapped.
@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 Oct 3, 2025
@daeyeon daeyeon added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. labels Oct 6, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 6, 2025
@nodejs-github-bot nodejs-github-bot merged commit db56020 into nodejs:main Oct 6, 2025
31 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in db56020

@nglgzz nglgzz deleted the patch-1 branch October 6, 2025 09:57
targos pushed a commit that referenced this pull request Oct 6, 2025
This note on `options.stdio` mentions that it's not recommended to pass
`stdin` as a writable stream and `stdout/stderr` as readable, but then
proceeds to say to always check that `stdin` is writable and
`stdout/stderr` are readable.

Going by the examples and the fact that `process.stdin` is readable and
`process.stdout/process.stderr` are writable, I'm assuming that the
types in the recommendation got swapped.

PR-URL: #60114
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Akhil Marsonya <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. 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.

6 participants