News for hackers. Stuff that matters.
Re:Don't setenv in multi-threaded code on glibc by quotemstr on Tuesday January 31, 2017 @01:09PM (#13533367)
I'd go write a getenv_r myself right now, but my gut feeling is that the glibc people would reject the patch on the basis that POSIX says that getenv is unsafe, we get along without a getenv_r, and therefore we don't need a getenv_r. This is why we can't have nice things.
Re:Don't setenv in multi-threaded code on glibc by alyandon on Tuesday January 31, 2017 @02:08PM (#13534068)
I don't know why you are getting downvotes. Someone tried to propose a getenv_r implementation for glibc in 2007 and even submitted a patch - which was rejected by a certain someone that is pretty famous for not wanting "bsd crap" in glibc.

https://sourceware.org/bugzilla/show_bug.cgi?id=4350

Re:Don't setenv in multi-threaded code on glibc by viraptor on Tuesday January 31, 2017 @08:57PM (#13537492)
Since he left, some old ideas have been raised again and merged. It could be worth revisiting.
Re:Don't setenv in multi-threaded code on glibc by alyandon on Tuesday January 31, 2017 @10:34PM (#13537996)
Ah, that's right he did move on. :)