From e5a17f57dae038e1c91e87a964666fc94ffa543c Mon Sep 17 00:00:00 2001 From: Angelo Gazzola Date: Fri, 3 Oct 2025 16:44:47 +0200 Subject: [PATCH] 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. --- doc/api/child_process.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/child_process.md b/doc/api/child_process.md index de45bf328d9fdb..2d239240b328f8 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -1078,8 +1078,8 @@ pipes between the parent and child. The value is one of the following: them incorrectly (e.g., passing a readable stream where a writable stream is expected) can lead to unexpected results or errors. This practice is discouraged as it may result in undefined behavior or dropped callbacks if the stream - encounters errors. Always ensure that `stdin` is used as writable and - `stdout`/`stderr` as readable to maintain the intended flow of data between + encounters errors. Always ensure that `stdin` is used as readable and + `stdout`/`stderr` as writable to maintain the intended flow of data between the parent and child processes. 7. Positive integer: The integer value is interpreted as a file descriptor that is open in the parent process. It is shared with the child