Answers for "nodejs chaning env variable at runtime"

1

nodejs chaning env variable at runtime

It isn't possible to modify the env vars 
of a running process. This isn't unique to 
NodeJS processes. It's just how env vars 
work on UNIX like operating systems.
The vars live within the address space of 
the process. And while they are, typically,
initially placed at a well known location
near the top of the stack the current vars are 
likely to be at an arbitrary address in the heap. 
Env vars are intentionally private to each process. 
So unless the program provides an API for 
changing its env vars you can't
modify them once the program is running.
Posted by: Guest on July-01-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language