Skip to content

Commit

Permalink
doc: fix two doc errors in stream and process
Browse files Browse the repository at this point in the history
`process.stdout` always blocks as of
20176a9

`WritableState.buffer` is `getBuffer()` as of
9158666

PR-URL: #2549
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: Evan Lucas <evanlucas@me.com>
  • Loading branch information
Fishrock123 committed Sep 14, 2015
1 parent abb2a4b commit 892bf65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions doc/api/process.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,7 @@ For example, a `console.log` equivalent could look like this:

`process.stderr` and `process.stdout` are unlike other streams in Node.js in
that they cannot be closed (`end()` will throw), they never emit the `finish`
event and that writes are usually blocking.

- They are blocking in the case that they refer to regular files or TTY file
descriptors.
- In the case they refer to pipes:
- They are blocking in Linux/Unix.
- They are non-blocking like other streams in Windows.
event and that writes are always blocking.

To check if Node.js is being run in a TTY context, read the `isTTY` property
on `process.stderr`, `process.stdout`, or `process.stdin`:
Expand Down
4 changes: 2 additions & 2 deletions doc/api/stream.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -1440,8 +1440,8 @@ var transform = new stream.Transform({
<!--type=misc-->

Both Writable and Readable streams will buffer data on an internal
object called `_writableState.buffer` or `_readableState.buffer`,
respectively.
object which can be retrieved from `_writableState.getBuffer()` or
`_readableState.buffer`, respectively.

The amount of data that will potentially be buffered depends on the
`highWaterMark` option which is passed into the constructor.
Expand Down

0 comments on commit 892bf65

Please sign in to comment.