Skip to content

Commit 2d77d03

Browse files
committed
doc: fix two doc errors in stream and process
`process.stdout` always blocks as of 20176a9 `WritableState.buffer` is `getBuffer()` as of 9158666 PR-URL: #2549 Reviewed-By: Alexis Campailla <[email protected]> Reviewed-By: Evan Lucas <[email protected]>
1 parent 55ac24f commit 2d77d03

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

doc/api/process.markdown

+1-7
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,7 @@ For example, a `console.log` equivalent could look like this:
256256

257257
`process.stderr` and `process.stdout` are unlike other streams in Node.js in
258258
that they cannot be closed (`end()` will throw), they never emit the `finish`
259-
event and that writes are usually blocking.
260-
261-
- They are blocking in the case that they refer to regular files or TTY file
262-
descriptors.
263-
- In the case they refer to pipes:
264-
- They are blocking in Linux/Unix.
265-
- They are non-blocking like other streams in Windows.
259+
event and that writes are always blocking.
266260

267261
To check if Node.js is being run in a TTY context, read the `isTTY` property
268262
on `process.stderr`, `process.stdout`, or `process.stdin`:

doc/api/stream.markdown

+2-2
Original file line numberDiff line numberDiff line change
@@ -1440,8 +1440,8 @@ var transform = new stream.Transform({
14401440
<!--type=misc-->
14411441

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

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

0 commit comments

Comments
 (0)