From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21064 invoked by alias); 13 Jun 2013 08:06:49 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 21017 invoked by uid 48); 13 Jun 2013 08:06:44 -0000 From: "hadess at hadess dot net" To: glibc-bugs@sourceware.org Subject: [Bug libc/15607] Add threadsafe version of getenv() Date: Thu, 13 Jun 2013 08:06:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: hadess at hadess dot net X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-06/txt/msg00096.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15607 --- Comment #5 from Bastien Nocera --- (In reply to Rich Felker from comment #4) > 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.