Skip to content

Commit 1b75a60

Browse files
nglgzzmarco-ippolito
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 <cjihrig@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent dc58b4e commit 1b75a60

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

0 commit comments

Comments
 (0)