| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9703513 commit 81f561b
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1512,8 +1512,10 @@ Android) | |||
| 1512 | 1512 | ||
| 1513 | 1513 | * {Stream} | |
| 1514 | 1514 | ||
| 1515 | - The `process.stderr` property returns a [Writable][] stream connected to | ||
| 1516 | - `stderr` (fd `2`). | ||
| 1515 | + The `process.stderr` property returns a stream connected to | ||
| 1516 | + `stderr` (fd `2`). It is a [`net.Socket`][] (which is a [Duplex][] | ||
| 1517 | + stream) unless fd `2` refers to a file, in which case it is | ||
| 1518 | + a [Writable][] stream. | ||
| 1517 | 1519 | ||
| 1518 | 1520 | Note: `process.stderr` differs from other Node.js streams in important ways, | |
| 1519 | 1521 | see [note on process I/O][] for more information. | |
@@ -1522,8 +1524,10 @@ see [note on process I/O][] for more information. | |||
| 1522 | 1524 | ||
| 1523 | 1525 | * {Stream} | |
| 1524 | 1526 | ||
| 1525 | - The `process.stdin` property returns a [Readable][] stream equivalent to or | ||
| 1526 | - associated with `stdin` (fd `0`). | ||
| 1527 | + The `process.stdin` property returns a stream connected to | ||
| 1528 | + `stdin` (fd `0`). It is a [`net.Socket`][] (which is a [Duplex][] | ||
| 1529 | + stream) unless fd `0` refers to a file, in which case it is | ||
| 1530 | + a [Readable][] stream. | ||
| 1527 | 1531 | ||
| 1528 | 1532 | For example: | |
| 1529 | 1533 | ||
@@ -1542,7 +1546,7 @@ process.stdin.on('end', () => { | |||
| 1542 | 1546 | }); | |
| 1543 | 1547 | ``` | |
| 1544 | 1548 | ||
| 1545 | - As a [Readable][] stream, `process.stdin` can also be used in "old" mode that | ||
| 1549 | + As a [Duplex][] stream, `process.stdin` can also be used in "old" mode that | ||
| 1546 | 1550 | is compatible with scripts written for Node.js prior to v0.10. | |
| 1547 | 1551 | For more information see [Stream compatibility][]. | |
| 1548 | 1552 | ||
@@ -1554,8 +1558,10 @@ must call `process.stdin.resume()` to read from it. Note also that calling | |||
| 1554 | 1558 | ||
| 1555 | 1559 | * {Stream} | |
| 1556 | 1560 | ||
| 1557 | - The `process.stdout` property returns a [Writable][] stream connected to | ||
| 1558 | - `stdout` (fd `1`). | ||
| 1561 | + The `process.stdout` property returns a stream connected to | ||
| 1562 | + `stdout` (fd `1`). It is a [`net.Socket`][] (which is a [Duplex][] | ||
| 1563 | + stream) unless fd `1` refers to a file, in which case it is | ||
| 1564 | + a [Writable][] stream. | ||
| 1559 | 1565 | ||
| 1560 | 1566 | For example, to copy process.stdin to process.stdout: | |
| 1561 | 1567 | ||
@@ -1790,6 +1796,7 @@ cases: | |||
| 1790 | 1796 | [TTY]: tty.html#tty_tty | |
| 1791 | 1797 | [Writable]: stream.html#stream_writable_streams | |
| 1792 | 1798 | [Readable]: stream.html#stream_readable_streams | |
| 1799 | + [Duplex]: stream.html#stream_duplex_and_transform_streams | ||
| 1793 | 1800 | [Child Process]: child_process.html | |
| 1794 | 1801 | [Cluster]: cluster.html | |
| 1795 | 1802 | [`process.exitCode`]: #process_process_exitcode | |
| Back | FazBrowse Home | New Git URL |
0 commit comments