doc: stdout/err/in are all Duplex streams

stdout, stderr and stdin are all Duplex streams but documentation
states otherwise

Fixes https://github.com/nodejs/node/issues/9201

PR-URL: https://github.com/nodejs/node/pull/11194
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
This commit is contained in:
Sebastian Van Sande 2017-02-06 10:56:47 +01:00 committed by Franziska Hinkelmann
parent 88daf88bd3
commit 1005b1dc74

View File

@ -1509,8 +1509,10 @@ Android)
* {Stream} * {Stream}
The `process.stderr` property returns a [Writable][] stream connected to The `process.stderr` property returns a stream connected to
`stderr` (fd `2`). `stderr` (fd `2`). It is a [`net.Socket`][] (which is a [Duplex][]
stream) unless fd `2` refers to a file, in which case it is
a [Writable][] stream.
Note: `process.stderr` differs from other Node.js streams in important ways, Note: `process.stderr` differs from other Node.js streams in important ways,
see [note on process I/O][] for more information. see [note on process I/O][] for more information.
@ -1519,8 +1521,10 @@ see [note on process I/O][] for more information.
* {Stream} * {Stream}
The `process.stdin` property returns a [Readable][] stream equivalent to or The `process.stdin` property returns a stream connected to
associated with `stdin` (fd `0`). `stdin` (fd `0`). It is a [`net.Socket`][] (which is a [Duplex][]
stream) unless fd `0` refers to a file, in which case it is
a [Readable][] stream.
For example: For example:
@ -1539,7 +1543,7 @@ process.stdin.on('end', () => {
}); });
``` ```
As a [Readable][] stream, `process.stdin` can also be used in "old" mode that As a [Duplex][] stream, `process.stdin` can also be used in "old" mode that
is compatible with scripts written for Node.js prior to v0.10. is compatible with scripts written for Node.js prior to v0.10.
For more information see [Stream compatibility][]. For more information see [Stream compatibility][].
@ -1551,8 +1555,10 @@ must call `process.stdin.resume()` to read from it. Note also that calling
* {Stream} * {Stream}
The `process.stdout` property returns a [Writable][] stream connected to The `process.stdout` property returns a stream connected to
`stdout` (fd `1`). `stdout` (fd `1`). It is a [`net.Socket`][] (which is a [Duplex][]
stream) unless fd `1` refers to a file, in which case it is
a [Writable][] stream.
For example, to copy process.stdin to process.stdout: For example, to copy process.stdin to process.stdout:
@ -1793,6 +1799,7 @@ cases:
[TTY]: tty.html#tty_tty [TTY]: tty.html#tty_tty
[Writable]: stream.html#stream_writable_streams [Writable]: stream.html#stream_writable_streams
[Readable]: stream.html#stream_readable_streams [Readable]: stream.html#stream_readable_streams
[Duplex]: stream.html#stream_duplex_and_transform_streams
[Child Process]: child_process.html [Child Process]: child_process.html
[Cluster]: cluster.html [Cluster]: cluster.html
[`process.exitCode`]: #process_process_exitcode [`process.exitCode`]: #process_process_exitcode