3 ms·
> Once again, the OP asked why setenv is even needed, which implies they likely don’t have much experience with spawning processes in low level languages I am
by eqvinox 3y ago
> Once again, the OP asked why setenv is even needed, which implies they likely don’t have much experience with spawning processes in low level languages
I am the OP and your assumption is incorrect. You may consider why the post ends with:
(NB: starting a new process is not "at runtime")
- Izkata 3y ago"export" in shells has to change the environ before they start the new process. It may not be "at runtime" for the new process, but it would be for the shell.
- account42 3y agoWrong, export does not have to change the shell's environment at all. There are plenty of exec variants that accept a different environment pointer, same for posix_spawn.