Environment variables are my second least favorite thing about Unix-like operating systems. So let's finally talk about EXACTLY how they work under the hood in your program by diving as deep into the source as we can.
Rust program crash: https://www.geldata.com/blog/c-stdlib-isn-t-threadsafe-and-even-safe-rust-didn-t-save-us
Sleep from scratch: https://www.youtube.com/watch?v=IbibjkI1kIs
glibc source code: https://sourceware.org/git/gitweb.cgi?p=glibc.git