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

That is a technical solution. What is your solution to the much more serious social problem of adding this check to every codebase in existence? What points of leverage do you have?


The point was about adding a mutex inside libc in getenv and setenv. That way, every codebase in existence automatically gets this safety. The poster I was replying to claimed that this wouldn't help, because it would still not offer thread safety when doing multiple operations.

I pointed out that, in addition to libc setenv/getenv using a mutex internally, they could also expose new functions to allow transactional access for anyone that really needs it - though I suspect that is a vanishingly small minority.


Ah I see — in that case you might be interested in the lockless illumos impl https://github.com/illumos/illumos-gate/blob/master/usr/src/...




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

Search: