4 ms·
there are lots of programs that access `*environ` directly, so while this might be good, it wouldn’t solve all classes of the problem. There are also uses out t
by raggi 3y ago
there are lots of programs that access `*environ` directly, so while this might be good, it wouldn’t solve all classes of the problem. There are also uses out there which are performance sensitive (and often just as if not more unsafe, such as holding pointers into the structure over long periods).
threaded programs should probably seriously consider retiring libc, but we don’t currently have a common ground replacement.
name related activities are one of the worst areas, contributing significantly to the glibc linkage and abi challenges, but also lacking sufficient standards for alternatives or even consensus to be built quickly.
- dundarious 3y agoYes, on Linux you can even write `int main(int argc, char* argv[], char* envp[])`.
- o11c 3y ago`envp` is unsafe after `setenv` even in single-threaded programs though. So you really should use `environ`.