3 ms·
> I don't think the C standard would ever introduce `tgetenv()` to fix a problem it doesn't have The C standard has no problem acknowledging that getenv is su
by josefx 3y ago
> I don't think the C standard would ever introduce `tgetenv()` to fix a problem it doesn't have
The C standard has no problem acknowledging that getenv is subject to data races for most of its implementations. As far as I can tell that part was even added at the same time as threading support.
- DSMan195276 3y agoWell actually I'll have to eat my words on that one - I didn't catch that Annex K in C11 includes `getenv_s` (even if it is optional).