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:41:15 -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).
Stephan,
For the record, are you for or against using environment variables
to tune library behaviour?
You have made it clear that you are worried that the average user
might not understand the implications of environment variables.
Resolving that is going to be a process of education, but it is
a downside to this feature. The user needs to be sufficiently
educated about environment variables to understand they are
passed on to child processes. My opinion is that users already
understand this and that it is a feature, and that an API will
help them reset all defaults if required before spawning. They
can do that today by clearing GLIBC_* env vars along with the
full list of LD_* and MALLOC_* env vars, but we will provide
some convenience functions for this.
Cheers,
Carlos.