Skip to content

Commit ca2dff6

Browse files
nglgzzaduh95
authored andcommitted
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 3fca564 commit ca2dff6

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
@@ -1076,8 +1076,8 @@ pipes between the parent and child. The value is one of the following:
10761076
them incorrectly (e.g., passing a readable stream where a writable stream is
10771077
expected) can lead to unexpected results or errors. This practice is discouraged
10781078
as it may result in undefined behavior or dropped callbacks if the stream
1079-
encounters errors. Always ensure that `stdin` is used as writable and
1080-
`stdout`/`stderr` as readable to maintain the intended flow of data between
1079+
encounters errors. Always ensure that `stdin` is used as readable and
1080+
`stdout`/`stderr` as writable to maintain the intended flow of data between
10811081
the parent and child processes.
10821082
7. Positive integer: The integer value is interpreted as a file descriptor
10831083
that is open in the parent process. It is shared with the child

0 commit comments

Comments
 (0)