Skip to content

Commit 071bbea

Browse files
HarshithaKPcodebytere
authored andcommitted
doc: document process.std*.fd
Fixes: #28386 Refs: #31292 Refs: nodejs/help#2136 PR-URL: #31395 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent a0c2f27 commit 071bbea

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

doc/api/process.md

+24
Original file line numberDiff line numberDiff line change
@@ -2130,6 +2130,14 @@ a [Writable][] stream.
21302130
`process.stderr` differs from other Node.js streams in important ways. See
21312131
[note on process I/O][] for more information.
21322132

2133+
### `process.stderr.fd`
2134+
2135+
* {number}
2136+
2137+
This property refers to the value of underlying file descriptor of
2138+
`process.stderr`. The value is fixed at `2`. In [`Worker`][] threads,
2139+
this field does not exist.
2140+
21332141
## `process.stdin`
21342142

21352143
* {Stream}
@@ -2163,6 +2171,14 @@ In "old" streams mode the `stdin` stream is paused by default, so one
21632171
must call `process.stdin.resume()` to read from it. Note also that calling
21642172
`process.stdin.resume()` itself would switch stream to "old" mode.
21652173

2174+
### `process.stdin.fd`
2175+
2176+
* {number}
2177+
2178+
This property refers to the value of underlying file descriptor of
2179+
`process.stdin`. The value is fixed at `0`. In [`Worker`][] threads,
2180+
this field does not exist.
2181+
21662182
## `process.stdout`
21672183

21682184
* {Stream}
@@ -2181,6 +2197,14 @@ process.stdin.pipe(process.stdout);
21812197
`process.stdout` differs from other Node.js streams in important ways. See
21822198
[note on process I/O][] for more information.
21832199

2200+
### `process.stdout.fd`
2201+
2202+
* {number}
2203+
2204+
This property refers to the value of underlying file descriptor of
2205+
`process.stdout`. The value is fixed at `1`. In [`Worker`][] threads,
2206+
this field does not exist.
2207+
21842208
### A note on process I/O
21852209

21862210
`process.stdout` and `process.stderr` differ from other Node.js streams in

0 commit comments

Comments
 (0)