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: "hadess at hadess dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 13 Jun 2013 08:06:43 +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 #5 from Bastien Nocera <hadess at hadess dot net> ---
(In reply to Rich Felker from comment #4)
<snip>
> As far as I'm concerned, this bug report should be filed against
> gnome-settings-daemon,
The bug has already been reported and fixed against gnome-settings-daemon. Did
you follow the link?
> not glibc, and it should be fixed by (preferably)
> avoiding modification to the environment in the process itself and using the
> appropriate exec-type functions, or by generating a completely new
> environment and replacing extern char **environ atomically with a pointer to
> the new environment.
The problem is that even if we do that, the code sucks, and it's a huge amount
of code compared to what it could be. Do you have a better way to do this?
> Note that, if others do end up deeming it desirable to change glibc, the
> appropriate change would be having setenv do the above-described atomic
> replacement and simply leak the old environment. This would be fully safe
> with no locking.
Per-thread env?
--
You are receiving this mail because:
You are on the CC list for the bug.