From 0603a92d48e63149617ee01e41ca6b7f4a0b852f Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Tue, 25 Aug 2015 17:19:18 -0400 Subject: [PATCH] doc: fix two doc errors in stream and process `process.stdout` always blocks as of 20176a98416353d4596900793f739d5ebf4f0ee1 `WritableState.buffer` is `getBuffer()` as of 91586661c983f45d650644451df73c8649a8d459 PR-URL: https://github.com/nodejs/node/pull/2549 Reviewed-By: Alexis Campailla Reviewed-By: Evan Lucas --- doc/api/process.markdown | 8 +------- doc/api/stream.markdown | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/doc/api/process.markdown b/doc/api/process.markdown index 32bcdd6fd4921a..973a6324c4b4f6 100644 --- a/doc/api/process.markdown +++ b/doc/api/process.markdown @@ -246,13 +246,7 @@ For example, a `console.log` equivalent could look like this: `process.stderr` and `process.stdout` are unlike other streams in io.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 io.js is being run in a TTY context, read the `isTTY` property on `process.stderr`, `process.stdout`, or `process.stdin`: diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index 2ae4b4b2ce7748..b175fc867df9ab 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -1440,8 +1440,8 @@ var transform = new stream.Transform({ 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.