2 ms·
I am trying to make sense of the argument of pushing configuration into a library: * if the library is just a dependency, the Linux loader will set it up.
by faiD9Eet 3y ago
I am trying to make sense of the argument of pushing configuration into a library:
* if the library is just a dependency, the Linux loader will set it up. It will have the same environment as the other libraries and as the main program.
* if the library is set up by dlopen(), there is no way to provide an environment pointer
Altering the global environment variable for child processes makes no sense, for
execve()
accepts an
char* envp[]
. So I guess we need to talk about issues with a specific use case of
dlopen()
- planede 3y agoMaybe the dlopen issue could be hacked around by dlmopen and injecting getenv and setenv symbols that access a different environment variable list than the application's.