2 ms·
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 librarie
by JdeBP 10y ago
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).