This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/15607] Add threadsafe version of getenv()
- From: "jakub at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 12 Jun 2013 14:58:21 +0000
- Subject: [Bug libc/15607] Add threadsafe version of getenv()
- Auto-submitted: auto-generated
- References: <bug-15607-131 at http dot sourceware dot org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=15607
--- Comment #2 from Jakub Jelinek <jakub at redhat dot com> ---
It is certainly not straightforward or cleaner, if all the uses of getenv in
glibc are converted to a version that requires locking, there will be a
significant cost to all apps out there, not just one particular that does
something like this.
The current behavior of setenv/putenv is clearly documented.
Why exactly do you want to change environment of the running multi-threaded
process, as opposed just making sure that upon exec the executed programs will
get the desired environment?
You can use execle or execvpe functions for that.
--
You are receiving this mail because:
You are on the CC list for the bug.