This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Consensus: Tuning runtime behaviour with environment variables.
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Stephan Bergmann <sbergman at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Roland McGrath <roland at hack dot frob dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, Andreas Jaeger <aj at suse dot com>, "Ryan S. Arnold" <ryan dot arnold at gmail dot com>, Andi Kleen <andi at firstfloor dot org>, David Miller <davem at davemloft dot net>, Siddhesh Poyarekar <siddhesh at redhat dot com>, Andreas Schwab <schwab at suse dot de>
- Date: Wed, 29 May 2013 11:34:44 -0400
- Subject: Re: Consensus: Tuning runtime behaviour with environment variables.
- References: <51A58A92 dot 4050508 at redhat dot com> <51A5A99A dot 8020508 at redhat dot com>
On 05/29/2013 03:09 AM, Stephan Bergmann wrote:
> On 05/29/2013 06:56 AM, Carlos O'Donell wrote:
>> - User changeable environment variables that impact library runtime
>> behaviour is dangerous.
>>
>> * Could you specifically point out what you find dangerous?
>> I see no more danger than we already face when adding a new
>> API or reviewing code changes. How is this different
>> than all of the other work we do?
>
> One general problem of env vars is that they can all too easily
> affect processes they were not intended to affect (like when the
> target process spawns another process).
That's not a problem, that is the intent.
You must educate yourself on how environment
variables work in Unix systems if you are going
to use them.
Setting an environment variable is a statement
of intent that you want to tune the library
in a particular way for all children of the
shell.
Tuning should remain across all children
unless a child specifically removes it by
cleaning their environment, or if the child
is AT_SECURE and the env var in a non-default
mode would cause application breakage.
As Rich Felker noted we are going to use a consistent
namespace so you can remove all of the GLIBC_* env
vars before starting another process. An API for
resetting tunables to defaults is also going to
be available.
Does that clarify the position?
Cheers,
Carlos.