Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> First, we can make a thread-safe implementation, like Illumos/Solaris. This has some limitations: it leaks memory in setenv(), and is still unsafe if a program uses putenv() or the environ variable.

No, `putenv()` in Solaris/Illumos is thread-safe too. And the program should NOT write to `environ`, but as it happens Solaris/Illumos allows that too (but it can cause a lock to be taken in `getenv()`.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: