From dc27a37bfa9fad6c5d042167ec3098a9bba4776a Mon Sep 17 00:00:00 2001 From: Harshitha KP Date: Fri, 10 Jan 2020 05:30:57 -0500 Subject: [PATCH] doc: explain process.stdout in worker_threads fixes: https://github.com/nodejs/node/issues/28386 --- doc/api/tty.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/api/tty.md b/doc/api/tty.md index 0c2f963750fd1f..b82e02742fbb70 100644 --- a/doc/api/tty.md +++ b/doc/api/tty.md @@ -289,6 +289,10 @@ The `tty.isatty()` method returns `true` if the given `fd` is associated with a TTY and `false` if it is not, including whenever `fd` is not a non-negative integer. +Within `worker_threads`, this API will return `false` for process.stdout. +This is because the `process.stdout` of the worker is a pipe into the parent, +not actually a TTY. + [`process.stderr`]: process.html#process_process_stderr [`process.stdin`]: process.html#process_process_stdin [`process.stdout`]: process.html#process_process_stdout