Skip to content

Commit ead654f

Browse files
daeyeontargos
authored andcommitted
doc: clarify use of process.env in worker threads on Windows
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: #49008 Fixes: #48955 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
1 parent 4047947 commit ead654f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

doc/api/process.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1668,7 +1668,9 @@ each [`Worker`][] thread has its own copy of `process.env`, based on its
16681668
parent thread's `process.env`, or whatever was specified as the `env` option
16691669
to the [`Worker`][] constructor. Changes to `process.env` will not be visible
16701670
across [`Worker`][] threads, and only the main thread can make changes that
1671-
are visible to the operating system or to native add-ons.
1671+
are visible to the operating system or to native add-ons. On Windows, a copy of
1672+
`process.env` on a [`Worker`][] instance operates in a case-sensitive manner
1673+
unlike the main thread.
16721674
16731675
## `process.execArgv`
16741676

doc/api/worker_threads.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,8 @@ Notable differences inside a Worker environment are:
844844
unless otherwise specified. Changes to one copy are not visible in other
845845
threads, and are not visible to native add-ons (unless
846846
[`worker.SHARE_ENV`][] is passed as the `env` option to the
847-
[`Worker`][] constructor).
847+
[`Worker`][] constructor). On Windows, unlike the main thread, a copy of the
848+
environment variables operates in a case-sensitive manner.
848849
* [`process.title`][] cannot be modified.
849850
* Signals are not delivered through [`process.on('...')`][Signals events].
850851
* Execution may stop at any point as a result of [`worker.terminate()`][]

0 commit comments

Comments
 (0)