3 ms·
>I also want to point out that (at least on Linux) getenv() returns a pointer to the stack! How could anybody with basic programming literacy reasonably expect
by GoblinSlayer 3y ago
>I also want to point out that (at least on Linux) getenv() returns a pointer to the stack! How could anybody with basic programming literacy reasonably expect that to be thread safe?
getenv_r is the standard way to provide thread safety in such situations: https://man.netbsd.org/getenv.3 https://man.netbsd.org/getenv.3