mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
doc: document the fds behind stdin/out/err
Its common knowledge on unix, but node documentation depends on knowing this, as it exposes both streams named after stdio, and the fd numbers, so make this explicit. Fixes: https://github.com/joyent/node/pull/8624 PR-URL: https://github.com/joyent/node/pull/8454 Reviewed-by: Trevor Norris <trev.norris@gmail.com> Cherry-picked-from: https://github.com/joyent/node/commit/13a992b1c2e1d0e69567fb94bc35f978c4c37ce5
This commit is contained in:
1 parent
d8d1c4c87c
commit
37569cd2b2
1 file changed
+3
-3
@@ -172,7 +172,7 @@ emulation with `process.kill()`, and `child_process.kill()`:
|
||||
|
||||
## process.stdout
|
||||
|
||||
A `Writable Stream` to `stdout`.
|
||||
A `Writable Stream` to `stdout` (on fd `1`).
|
||||
|
||||
Example: the definition of `console.log`
|
||||
|
||||
@@ -207,7 +207,7 @@ See [the tty docs](tty.html#tty_tty) for more information.
|
||||
|
||||
## process.stderr
|
||||
|
||||
A writable stream to stderr.
|
||||
A writable stream to stderr (on fd `2`).
|
||||
|
||||
`process.stderr` and `process.stdout` are unlike other streams in Node in
|
||||
that they cannot be closed (`end()` will throw), they never emit the `finish`
|
||||
@@ -222,7 +222,7 @@ event and that writes are usually blocking.
|
||||
|
||||
## process.stdin
|
||||
|
||||
A `Readable Stream` for stdin.
|
||||
A `Readable Stream` for stdin (on fd `0`).
|
||||
|
||||
Example of opening standard input and listening for both events:
|
||||
|
||||
|
||||
Reference in new issue
Block a user