Skip to content

Commit

Permalink
doc: clarify use of process.env in worker threads on Windows
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
daeyeon authored and RafaelGSS committed Aug 15, 2023
1 parent 26a2047 commit e5e5fd5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion doc/api/process.md
Expand Up @@ -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`
Expand Down
3 changes: 2 additions & 1 deletion doc/api/worker_threads.md
Expand Up @@ -850,7 +850,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()`][]
Expand Down

0 comments on commit e5e5fd5

Please sign in to comment.