Email List: Xaustin-group-lX
[All Lists]

Re: Invalid shell assignments in environment

To: dgk@xxxxxxxxxxxxxxxx, chet.ramey@xxxxxxxx
Subject: Re: Invalid shell assignments in environment
From: Joerg.Schilling@xxxxxxxxxxxxxxxxxxx (Joerg Schilling)
Date: Thu, 02 Jul 2009 11:45:10 +0200
Cc: chet.ramey@xxxxxxxx, austin-group-l@xxxxxxxxxxxxx
References: <200907012242.n61MgCCp020103@penguin.research.att.com><4A4C2005.6030402@case.edu>
Chet Ramey <chet.ramey@case.edu> wrote:

> > I will do whatever the standard requires.  I would like
> > to hear argument on both sides.
>
> Interesting.  I changed it the other way because I got a bug report
> about bash creating invalid variables if such names appeared in the
> environment.  Since bash uses its table of variables and functions
> to create the export environment, the "passing along" stopped as a
> side effect.

My shell (bsh) passes environment variable regardless of the names.
This was never changed during the past 25 years.

> There are a growing number of applications that attempt to take
> advantage of this and use environment variable names that are not
> valid shell variable names.

This does not sound reasonable. If you use environemnt variables, you expect 
them to be propagates to child processes - otherwise they would not make sense.
If the related behavior is different when a shell process is used as 
intermediate for creating the child (e.g. via make), it sems to be just 
unreliable behavior.

Jörg

-- 
 EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js@cs.tu-berlin.de                (uni)  
       joerg.schilling@fokus.fraunhofer.de (work) Blog: 
http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily

<Prev in Thread] Current Thread [Next in Thread>