Evan Jones personal blog
Setenv Is Not Thread Safe and C Doesn't Want to Fix It
You can't safely use the C setenv() or unsetenv() functions in a program that uses threads. Those functions modify global state, and can cause other threads calling getenv() to crash. This also causes crashes in other languages that use those C standard library functions, such as Go's os.Setenv ( Go issue ) and Rust's…
- Points
- 204
- HN comments
- 326
- Submissions
- 1
- Cited by
- 4 commenters
Software EngineeringSystems & Performance2023
On Hacker News
| Submitted | Title on HN | Points | Comments |
|---|---|---|---|
| Nov 20, 2023 | Setenv Is Not Thread Safe and C Doesn't Want to Fix It by r4um | 204 | 326 |
Cited in comments
Linked from 4 Hacker News comments by 4 different people, from Nov 2024 to May 2025.
Most recent: