Skip to content

Commit 1099524

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 <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 099c921 commit 1099524

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

doc/api/process.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2162,6 +2162,14 @@ a [Writable][] stream.
21622162
`process.stderr` differs from other Node.js streams in important ways. See
21632163
[note on process I/O][] for more information.
21642164

2165+
### `process.stderr.fd`
2166+
2167+
* {number}
2168+
2169+
This property refers to the value of underlying file descriptor of
2170+
`process.stderr`. The value is fixed at `2`. In [`Worker`][] threads,
2171+
this field does not exist.
2172+
21652173
## `process.stdin`
21662174

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

2206+
### `process.stdin.fd`
2207+
2208+
* {number}
2209+
2210+
This property refers to the value of underlying file descriptor of
2211+
`process.stdin`. The value is fixed at `0`. In [`Worker`][] threads,
2212+
this field does not exist.
2213+
21982214
## `process.stdout`
21992215

22002216
* {Stream}
@@ -2213,6 +2229,14 @@ process.stdin.pipe(process.stdout);
22132229
`process.stdout` differs from other Node.js streams in important ways. See
22142230
[note on process I/O][] for more information.
22152231

2232+
### `process.stdout.fd`
2233+
2234+
* {number}
2235+
2236+
This property refers to the value of underlying file descriptor of
2237+
`process.stdout`. The value is fixed at `1`. In [`Worker`][] threads,
2238+
this field does not exist.
2239+
22162240
### A note on process I/O
22172241

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

0 commit comments

Comments
 (0)