From bab9baf9cddb90be43a2e8ab0818693b843a7516 Mon Sep 17 00:00:00 2001 From: Harshitha KP Date: Fri, 17 Jan 2020 02:02:03 -0500 Subject: [PATCH 1/3] 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 --- doc/api/process.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/doc/api/process.md b/doc/api/process.md index a8ca1a641e85e1..4d60ba3552697c 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -2158,6 +2158,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 +(in POSIX) or handle (an abstract resource reference in Windows) of +`process.stderr`. In `worker_thread`s, this field does not exist. + ## `process.stdin` * {Stream} @@ -2191,6 +2199,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 +(in POSIX) or handle (an abstract resource reference in Windows) of +`process.stdin`. In `worker_thread`s, this field does not exist. + ## `process.stdout` * {Stream} @@ -2209,6 +2225,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 +(in POSIX) or handle (an abstract resource reference in Windows) of +`process.stdout`. In `worker_thread`s, this field does not exist. + ### A note on process I/O `process.stdout` and `process.stderr` differ from other Node.js streams in From a89248ce1100a5fccd3aa15c321562d7594b4b58 Mon Sep 17 00:00:00 2001 From: Harshitha KP Date: Fri, 17 Jan 2020 09:32:54 -0500 Subject: [PATCH 2/3] fixup: address review comment --- doc/api/process.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/api/process.md b/doc/api/process.md index 4d60ba3552697c..4c651ad687d4ee 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -2162,9 +2162,9 @@ a [Writable][] stream. * {number} -This property refers to the value of underlying file descriptor -(in POSIX) or handle (an abstract resource reference in Windows) of -`process.stderr`. In `worker_thread`s, this field does not exist. +This property refers to the value of underlying file descriptor of +`process.stderr`. The value is fixed at `2`. In `worker_thread`s, +this field does not exist. ## `process.stdin` @@ -2203,9 +2203,9 @@ must call `process.stdin.resume()` to read from it. Note also that calling * {number} -This property refers to the value of underlying file descriptor -(in POSIX) or handle (an abstract resource reference in Windows) of -`process.stdin`. In `worker_thread`s, this field does not exist. +This property refers to the value of underlying file descriptor of +`process.stdin`. The value is fixed at `0`. In `worker_thread`s, +this field does not exist. ## `process.stdout` @@ -2229,9 +2229,9 @@ process.stdin.pipe(process.stdout); * {number} -This property refers to the value of underlying file descriptor -(in POSIX) or handle (an abstract resource reference in Windows) of -`process.stdout`. In `worker_thread`s, this field does not exist. +This property refers to the value of underlying file descriptor of +`process.stdout`. The value is fixed at `1`. In `worker_thread`s, +this field does not exist. ### A note on process I/O From bad564f40285d0c2f89900b92ed108f0daaa84fa Mon Sep 17 00:00:00 2001 From: Harshitha KP Date: Mon, 20 Jan 2020 00:02:35 -0500 Subject: [PATCH 3/3] fixup: address review comment --- doc/api/process.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/process.md b/doc/api/process.md index 4c651ad687d4ee..ea0b79a65a86bd 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -2163,7 +2163,7 @@ a [Writable][] stream. * {number} This property refers to the value of underlying file descriptor of -`process.stderr`. The value is fixed at `2`. In `worker_thread`s, +`process.stderr`. The value is fixed at `2`. In [`Worker`][] threads, this field does not exist. ## `process.stdin` @@ -2204,7 +2204,7 @@ must call `process.stdin.resume()` to read from it. Note also that calling * {number} This property refers to the value of underlying file descriptor of -`process.stdin`. The value is fixed at `0`. In `worker_thread`s, +`process.stdin`. The value is fixed at `0`. In [`Worker`][] threads, this field does not exist. ## `process.stdout` @@ -2230,7 +2230,7 @@ process.stdin.pipe(process.stdout); * {number} This property refers to the value of underlying file descriptor of -`process.stdout`. The value is fixed at `1`. In `worker_thread`s, +`process.stdout`. The value is fixed at `1`. In [`Worker`][] threads, this field does not exist. ### A note on process I/O