This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Consensus: Tuning runtime behaviour with environment variables.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]