From d873a2c11e0d8c269cd47ebb2e38a5f93542c2cc Mon Sep 17 00:00:00 2001 From: Daeyeon Jeong Date: Sun, 6 Aug 2023 00:26:19 +0900 Subject: [PATCH] doc: clarify use of process.env in worker threads on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daeyeon Jeong PR-URL: https://github.com/nodejs/node/pull/49008 Fixes: https://github.com/nodejs/node/issues/48955 Reviewed-By: Luigi Pinca Reviewed-By: Ben Noordhuis Reviewed-By: Deokjin Kim Reviewed-By: Yagiz Nizipli Reviewed-By: Darshan Sen Reviewed-By: Tobias Nießen --- doc/api/process.md | 4 +++- doc/api/worker_threads.md | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/api/process.md b/doc/api/process.md index de56638e70d27e..5b08ce8a4b8367 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -1666,7 +1666,9 @@ each [`Worker`][] thread has its own copy of `process.env`, based on its parent thread's `process.env`, or whatever was specified as the `env` option to the [`Worker`][] constructor. Changes to `process.env` will not be visible across [`Worker`][] threads, and only the main thread can make changes that -are visible to the operating system or to native add-ons. +are visible to the operating system or to native add-ons. On Windows, a copy of +`process.env` on a [`Worker`][] instance operates in a case-sensitive manner +unlike the main thread. ## `process.execArgv` diff --git a/doc/api/worker_threads.md b/doc/api/worker_threads.md index 09b695eb96ea29..28afb77d8036a1 100644 --- a/doc/api/worker_threads.md +++ b/doc/api/worker_threads.md @@ -886,7 +886,8 @@ Notable differences inside a Worker environment are: unless otherwise specified. Changes to one copy are not visible in other threads, and are not visible to native add-ons (unless [`worker.SHARE_ENV`][] is passed as the `env` option to the - [`Worker`][] constructor). + [`Worker`][] constructor). On Windows, unlike the main thread, a copy of the + environment variables operates in a case-sensitive manner. * [`process.title`][] cannot be modified. * Signals are not delivered through [`process.on('...')`][Signals events]. * Execution may stop at any point as a result of [`worker.terminate()`][]