mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 23:16:30 +01:00
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.
This commit is contained in:
parent
3e6e63406d
commit
1d734a75b5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user