| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The stdio array note describes the stream passed for stdin as readable and stdout/stderr as writable, which is the reverse of the subprocess.stdin/subprocess.stdout streams created by 'pipe'. Readers keep conflating the two perspectives (see the linked issue and the self-closed PR nodejs#62175), so spell out the data flow and the contrast explicitly. Fixes: nodejs#56623 Signed-off-by: Avocado <ujubongbong@gmail.com>
| Back | FazBrowse Home | New Git URL |
Description
Clarify the stream-direction note under options.stdio (item 6, {Stream} object).
The note was added in #55322 with two sentences that contradicted each other, and #56623 was filed against that text. #60114 later fixed the contradiction, but did not reference the issue, so it stayed open.
The remaining wording is correct — a write-only stream in the stdin position fails with EBADF, while a readable stream works — but readers keep interpreting it from the perspective of subprocess.stdin/subprocess.stdout created by 'pipe', whose directions are the opposite. The issue reporter, the author of the self-closed #62175, and a later commenter all inverted it the same way.
This adds two sentences spelling out the data flow (the stream in the stdin position is the source the child reads its input from; the streams in the stdout/stderr positions receive the output the child writes) and contrasting it explicitly with subprocess.stdin/subprocess.stdout.
Fixes: #56623
Test plan