Skip to content

Commit

Permalink
doc: document the fds behind stdin/out/err
Browse files Browse the repository at this point in the history
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: nodejs/node-v0.x-archive#8624
PR-URL: nodejs/node-v0.x-archive#8454
Reviewed-by: Trevor Norris <[email protected]>

Cherry-picked-from: nodejs/node-v0.x-archive@13a992b
  • Loading branch information
sam-github authored and piscisaureus committed Jan 10, 2015
1 parent d8d1c4c commit 37569cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/api/process.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down Expand Up @@ -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`
Expand All @@ -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:

Expand Down

0 comments on commit 37569cd

Please sign in to comment.