News for hackers. Stuff that matters.
Re:Don't setenv in multi-threaded code on glibc by JdeBP on Wednesday February 01, 2017 @06:32AM (#13539890)
The C runtime libraries on various platforms do much the same. The environment array is not provided as such by the operating system, so the C runtime libraries set up their internal instances of the environment array, and sometimes of the entire environment. As you say, everything is easy as long as one always sticks to the C library functions for accessing/using the environment, and as long as one does not mix multiple C runtime libraries with one another within a single process (or indeed multiple runtime libraries from multiple languages).

There are no comments on this comment yet.