HNNewShowAskJobs
Built with Tanstack Start
What is going on in Unix with errno's limited nature(utcc.utoronto.ca)
13 points by ingve a day ago | 4 comments
  • ameliusa day ago

    Why didn't they mention threads?

    • bartvka day ago |parent

      Oh gosh, that's interesting. I bet that complicates using using errno. Or is errno somehow copied into a local variable?

      • Vogtinatora day ago |parent

        errno is in thread-local storage (TLS)

        • ameliusa day ago |parent

          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 :(