Skip to content

Commit 9c26c0f

Browse files
daeyeonRafaelGSS
authored andcommitted
doc: clarify use of process.env in worker threads on Windows
Signed-off-by: Daeyeon Jeong <[email protected]> PR-URL: #49008 Fixes: #48955 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Deokjin Kim <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent 7186e02 commit 9c26c0f

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
@@ -1666,7 +1666,9 @@ each [`Worker`][] thread has its own copy of `process.env`, based on its
16661666
parent thread's `process.env`, or whatever was specified as the `env` option
16671667
to the [`Worker`][] constructor. Changes to `process.env` will not be visible
16681668
across [`Worker`][] threads, and only the main thread can make changes that
1669-
are visible to the operating system or to native add-ons.
1669+
are visible to the operating system or to native add-ons. On Windows, a copy of
1670+
`process.env` on a [`Worker`][] instance operates in a case-sensitive manner
1671+
unlike the main thread.
16701672
16711673
## `process.execArgv`
16721674

doc/api/worker_threads.md

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

0 commit comments

Comments
 (0)