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 · 9h ago
Why didn't they mention threads?
bartvk · 8h ago
Oh gosh, that's interesting. I bet that complicates using using errno. Or is errno somehow copied into a local variable?
Vogtinator · 7h ago
errno is in thread-local storage (TLS)
amelius · 7h 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 :(