3 ms·
> I'd say you shouldn't be calling setenv() at all once you've spawned threads. Or, you know, get a better C library. https://src.illumos.org/source/xref/illu
by cryptonector 3y ago
> I'd say you shouldn't be calling setenv() at all once you've spawned threads.
Or, you know, get a better C library. https://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libc/port/gen/getenv.c?r=60b81b86#48 https://src.illumos.org/source/xref/illumos-gate/usr/src/lib...
- chollida1 3y agoCan you explain what point you are trying to get across? I just see a page of code.
- _justinfunk 3y agoJust read the code! /s
- sltkr 3y agoGrandparent didn't just link to "code"; they linked to a five-paragraph comment explaining what is going on. Did you read those comments before you posted your snarky reply? I think the gist of it is that unlike the glibc implementation, the Illumos implementation of getenv() is lock-free and thread-safe.
- _justinfunk 3y agoyou are a joy
- chasil 3y agoThat appears to be the OpenSolaris C library. I imagine that it is meant to convey that the quality is higher in this library than in GNU libc.
- wruza 3y agoAs the link contains a specific line number, I believe gp suggests to read comment blocks. I’m not very interested to dive into details atm, but at least the explanations seem to be on point.