Skip to content

Commit 343ddff

Browse files
HarshithaKPaddaleax
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 4f11fb6 commit 343ddff

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
@@ -2190,6 +2190,14 @@ a [Writable][] stream.
21902190
`process.stderr` differs from other Node.js streams in important ways. See
21912191
[note on process I/O][] for more information.
21922192

2193+
### `process.stderr.fd`
2194+
2195+
* {number}
2196+
2197+
This property refers to the value of underlying file descriptor of
2198+
`process.stderr`. The value is fixed at `2`. In [`Worker`][] threads,
2199+
this field does not exist.
2200+
21932201
## `process.stdin`
21942202

21952203
* {Stream}
@@ -2223,6 +2231,14 @@ In "old" streams mode the `stdin` stream is paused by default, so one
22232231
must call `process.stdin.resume()` to read from it. Note also that calling
22242232
`process.stdin.resume()` itself would switch stream to "old" mode.
22252233

2234+
### `process.stdin.fd`
2235+
2236+
* {number}
2237+
2238+
This property refers to the value of underlying file descriptor of
2239+
`process.stdin`. The value is fixed at `0`. In [`Worker`][] threads,
2240+
this field does not exist.
2241+
22262242
## `process.stdout`
22272243

22282244
* {Stream}
@@ -2241,6 +2257,14 @@ process.stdin.pipe(process.stdout);
22412257
`process.stdout` differs from other Node.js streams in important ways. See
22422258
[note on process I/O][] for more information.
22432259

2260+
### `process.stdout.fd`
2261+
2262+
* {number}
2263+
2264+
This property refers to the value of underlying file descriptor of
2265+
`process.stdout`. The value is fixed at `1`. In [`Worker`][] threads,
2266+
this field does not exist.
2267+
22442268
### A note on process I/O
22452269

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

0 commit comments

Comments
 (0)