Hacker News new | ask | show | jobs
by rerdavies 508 days ago
The documentation for setenv:

   Caveats: POSIX.1 does not require setenv() or unsetenv() to be reentrant.

   ...
   Interface: setenv(), unsetenv() 
   Attribute: Thread safety
   Value:  MT-Unsafe const:env

Libraries that are thread-safe DO provide that documentation. One assumes that libraries that don't provide that documentation are not thread=safe.

GnuTLS docs: The GnuTLS library is thread safe by design, meaning that objects of the library such as TLS sessions, can be safely divided across threads as long as a single thread accesses a single object.