From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17472 invoked by alias); 12 Jun 2013 14:58:29 -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 17414 invoked by uid 48); 12 Jun 2013 14:58:21 -0000 From: "jakub at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/15607] Add threadsafe version of getenv() Date: Wed, 12 Jun 2013 14:58: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: jakub at redhat dot com 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/msg00085.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15607 --- Comment #2 from Jakub Jelinek --- 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.