3 ms·
It's not clear from the man pages, but `setenv()` mutates `environ`. In particular, setting a previously-undefined variable causes `environ` to be reallocated.
by naruhodo 3y ago
It's not clear from the man pages, but `setenv()` mutates `environ`.
In particular, setting a previously-undefined variable causes `environ` to be reallocated. Whereas `setenv()` of an extant variable changes just that value in the current `environ` pointer array.