What is going on in Unix with errno's limited nature
13 ingve 4 7/4/2025, 6:25:11 AM utcc.utoronto.ca ↗
Comments (4)
amelius · 12h ago
Why didn't they mention threads?
bartvk · 10h ago
Oh gosh, that's interesting. I bet that complicates using using errno. Or is errno somehow copied into a local variable?
Vogtinator · 10h ago
errno is in thread-local storage (TLS)
amelius · 10h ago
Yes. It is too bad that they didn't use a similar solution for the current working directory. Chdir() is process-wide, not thread local :(