| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 409f299 commit a0db5fb
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -282,7 +282,9 @@ For example, a `console.log` equivalent could look like this: | |||
| 282 | 282 | ||
| 283 | 283 | `process.stderr` and `process.stdout` are unlike other streams in Node.js in | |
| 284 | 284 | that they cannot be closed (`end()` will throw), they never emit the `finish` | |
| 285 | - event and that writes are always blocking. | ||
| 285 | + event and that writes can block when output is redirected to a file (although | ||
| 286 | + disks are fast and operating systems normally employ write-back caching so it | ||
| 287 | + should be a very rare occurrence indeed.) | ||
| 286 | 288 | ||
| 287 | 289 | To check if Node.js is being run in a TTY context, read the `isTTY` property | |
| 288 | 290 | on `process.stderr`, `process.stdout`, or `process.stdin`: | |
@@ -305,14 +307,9 @@ A writable stream to stderr (on fd `2`). | |||
| 305 | 307 | ||
| 306 | 308 | `process.stderr` and `process.stdout` are unlike other streams in Node.js in | |
| 307 | 309 | that they cannot be closed (`end()` will throw), they never emit the `finish` | |
| 308 | - event and that writes are usually blocking. | ||
| 309 | - | ||
| 310 | - - They are blocking in the case that they refer to regular files or TTY file | ||
| 311 | - descriptors. | ||
| 312 | - - In the case they refer to pipes: | ||
| 313 | - - They are blocking in Linux/Unix. | ||
| 314 | - - They are non-blocking like other streams in Windows. | ||
| 315 | - | ||
| 310 | + event and that writes can block when output is redirected to a file (although | ||
| 311 | + disks are fast and operating systems normally employ write-back caching so it | ||
| 312 | + should be a very rare occurrence indeed.) | ||
| 316 | 313 | ||
| 317 | 314 | ## process.stdin | |
| 318 | 315 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments