It's a long standing bug, setenv and unsetenv are not thread-safe
Re:Rust Dependencies Scare Me
by robertlagrant on Friday May 09, 2025 @05:04PM
(#43940848)
I honestly think using setenv is just a terrible idea.
can you elaborate what is the simpelist alternative?
Re:Rust Dependencies Scare Me
by darthwalsh on Saturday May 10, 2025 @04:53PM
(#43948909)
Simple, you don't set any env vars after starting new threads
whatever the issue is, "setting an env var is unsafe" is so interesting to me that I'm now craving a blog post explaining this