Skip to content
This repository
Browse code

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.
  • Loading branch information...
commit 1d734a75b5764ac7414daab489ce82d6ca09f69f 1 parent 3e6e634
Pedro Ballesteros - @pmbah nitroduna authored tjfontaine committed

Showing 1 changed file with 14 additions and 6 deletions. Show diff stats Hide diff stats

  1. +14 6 doc/api/process.markdown
20 doc/api/process.markdown
Source Rendered
@@ -125,9 +125,13 @@ Example: the definition of `console.log`
125 125 };
126 126
127 127 `process.stderr` and `process.stdout` are unlike other streams in Node in
128   -that writes to them are usually blocking. They are blocking in the case
129   -that they refer to regular files or TTY file descriptors. In the case they
130   -refer to pipes, they are non-blocking like other streams.
  128 +that writes to them are usually blocking.
  129 +
  130 +- They are blocking in the case that they refer to regular files or TTY file
  131 + descriptors.
  132 +- In the case they refer to pipes:
  133 + - They are blocking in Linux/Unix.
  134 + - They are non-blocking like other streams in Windows.
131 135
132 136 To check if Node is being run in a TTY context, read the `isTTY` property
133 137 on `process.stderr`, `process.stdout`, or `process.stdin`:
@@ -149,9 +153,13 @@ See [the tty docs](tty.html#tty_tty) for more information.
149 153 A writable stream to stderr.
150 154
151 155 `process.stderr` and `process.stdout` are unlike other streams in Node in
152   -that writes to them are usually blocking. They are blocking in the case
153   -that they refer to regular files or TTY file descriptors. In the case they
154   -refer to pipes, they are non-blocking like other streams.
  156 +that writes to them are usually blocking.
  157 +
  158 +- They are blocking in the case that they refer to regular files or TTY file
  159 + descriptors.
  160 +- In the case they refer to pipes:
  161 + - They are blocking in Linux/Unix.
  162 + - They are non-blocking like other streams in Windows.
155 163
156 164
157 165 ## process.stdin

0 comments on commit 1d734a7

Please sign in to comment.
Something went wrong with that request. Please try again.