Skip to content

Commit db56020

Browse files
authored
doc: fix typo on child_process.md
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]>
1 parent 5b3c4b3 commit db56020

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/child_process.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,8 +1078,8 @@ pipes between the parent and child. The value is one of the following:
10781078
them incorrectly (e.g., passing a readable stream where a writable stream is
10791079
expected) can lead to unexpected results or errors. This practice is discouraged
10801080
as it may result in undefined behavior or dropped callbacks if the stream
1081-
encounters errors. Always ensure that `stdin` is used as writable and
1082-
`stdout`/`stderr` as readable to maintain the intended flow of data between
1081+
encounters errors. Always ensure that `stdin` is used as readable and
1082+
`stdout`/`stderr` as writable to maintain the intended flow of data between
10831083
the parent and child processes.
10841084
7. Positive integer: The integer value is interpreted as a file descriptor
10851085
that is open in the parent process. It is shared with the child

0 commit comments

Comments
 (0)