What is going on in Unix with errno's limited nature
12 ingve 4 7/4/2025, 6:25:11 AM utcc.utoronto.ca ↗
Comments (4)
amelius · 11h ago
Why didn't they mention threads?
bartvk · 9h ago
Oh gosh, that's interesting. I bet that complicates using using errno. Or is errno somehow copied into a local variable?
Vogtinator · 9h ago
errno is in thread-local storage (TLS)
amelius · 8h 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 :(