From 1099524452b6814cdbe8788bc3a7bdd3a3a3ec17 Mon Sep 17 00:00:00 2001 From: Harshitha KP Date: Fri, 17 Jan 2020 02:02:03 -0500 Subject: [PATCH] doc: document process.std*.fd Fixes: https://github.com/nodejs/node/issues/28386 Refs: https://github.com/nodejs/node/pull/31292 Refs: https://github.com/nodejs/help/issues/2136 PR-URL: https://github.com/nodejs/node/pull/31395 Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen --- doc/api/process.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/doc/api/process.md b/doc/api/process.md index b9014e5f5590b1..35962972d6cd4f 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -2162,6 +2162,14 @@ a [Writable][] stream. `process.stderr` differs from other Node.js streams in important ways. See [note on process I/O][] for more information. +### `process.stderr.fd` + +* {number} + +This property refers to the value of underlying file descriptor of +`process.stderr`. The value is fixed at `2`. In [`Worker`][] threads, +this field does not exist. + ## `process.stdin` * {Stream} @@ -2195,6 +2203,14 @@ In "old" streams mode the `stdin` stream is paused by default, so one must call `process.stdin.resume()` to read from it. Note also that calling `process.stdin.resume()` itself would switch stream to "old" mode. +### `process.stdin.fd` + +* {number} + +This property refers to the value of underlying file descriptor of +`process.stdin`. The value is fixed at `0`. In [`Worker`][] threads, +this field does not exist. + ## `process.stdout` * {Stream} @@ -2213,6 +2229,14 @@ process.stdin.pipe(process.stdout); `process.stdout` differs from other Node.js streams in important ways. See [note on process I/O][] for more information. +### `process.stdout.fd` + +* {number} + +This property refers to the value of underlying file descriptor of +`process.stdout`. The value is fixed at `1`. In [`Worker`][] threads, +this field does not exist. + ### A note on process I/O `process.stdout` and `process.stderr` differ from other Node.js streams in