Re: Proposed new POSIX sh policy, version two
On Sun, Nov 26, 2006 at 12:20:32PM -0800, Russ Allbery <email@example.com> wrote:
> Mike Hommey <firstname.lastname@example.org> writes:
> > Gabor Gombas <email@example.com> wrote:
> >> Because it is _NOT_ a bug in bash, it is a feature. AFAIR (it was some
> >> time ago I've looked at the code trying to fix this issue) bash
> >> guarantees some environment variables to always exist and to have a
> >> certain (initial) value, and that requires calls to the NSS functions.
> >> Removing support for the affected environment variables would fix the
> >> issue, but would break existing #!/bin/bash scripts depending on those
> >> variables. And I'm talking about user-written scripts, not
> >> Debian-provided scripts.
> > One could imagine a system where the variable is filled the first time
> > it is reclaimed. Most of the scripts don't, so most of the time, the nss
> > functions wouldn't be called. That may complicate bash code, though.
> The problem with that is that you'd have to fill in the enviromnent
> variable before the first time bash forks and execs a process, since bash
> has no way of knowing whether that child process is going to care about
> the environment variable. Which means that in practice bash is always
> going to have to fill in that information.