summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Ballesteros <nitroduna@gmail.com>2014-02-17 16:22:05 +0100
committerTimothy J Fontaine <tjfontaine@gmail.com>2014-02-18 13:36:00 -0800
commit1d734a75b5764ac7414daab489ce82d6ca09f69f (patch)
treeccb2ea5d8befd8f54f55982d60b001ce70bea845
parent3e6e63406d04093be39bafab84845365a1d0c971 (diff)
downloadnode-1d734a75b5764ac7414daab489ce82d6ca09f69f.tar.gz
doc: stdout blocking or non-blocking behaviour
Makes clear that the behaviour of stdout is blocking in Linux/Unix even when they refer to pipes.
-rw-r--r--doc/api/process.markdown20
1 files changed, 14 insertions, 6 deletions
diff --git a/doc/api/process.markdown b/doc/api/process.markdown
index 8cb613525..9d3125ce9 100644
--- a/doc/api/process.markdown
+++ b/doc/api/process.markdown
@@ -125,9 +125,13 @@ Example: the definition of `console.log`
};
`process.stderr` and `process.stdout` are unlike other streams in Node in
-that writes to them 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 non-blocking like other streams.
+that writes to them 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.
To check if Node is being run in a TTY context, read the `isTTY` property
on `process.stderr`, `process.stdout`, or `process.stdin`:
@@ -149,9 +153,13 @@ See [the tty docs](tty.html#tty_tty) for more information.
A writable stream to stderr.
`process.stderr` and `process.stdout` are unlike other streams in Node in
-that writes to them 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 non-blocking like other streams.
+that writes to them 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.
## process.stdin