bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FW: Documentation of POSIXLY_CORRECT


From: Eric Blake
Subject: Re: FW: Documentation of POSIXLY_CORRECT
Date: Mon, 16 Nov 2009 18:44:51 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de> writes:

> > export POSIXLY_CORRECT
> > POSIXLY_CORRECT=
> > 
> > (the two lines can appear in either order).
> 
> FWIW, you need to re-export a variable each time you change it; otherwise,
> it is possible that the variable has the new value, but the environment
> will propagate the old one; 'info Autoconf --index export' documents this.

That section of the manual states:

| Therefore you should `export' again each environment variable that
| you update; the export can occur before or after the assignment.

You only have to do the export once for the life of the shell, not once per 
assignment.  In other words, the bug is not that those shells track a local and 
an environment variable separately every time you make a local change, but 
rather that those shells forget to mark inherited variables as export, while 
still exporting inherited variables on to children.  Once you mark the variable 
as exported, the shell knows that the variable is on the export list, 
regardless of how many more times you change it.

-- 
Eric Blake







reply via email to

[Prev in Thread] Current Thread [Next in Thread]