bug-bash
[Top][All Lists]
Advanced

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

Re: bash hash bug


From: Eric Blake
Subject: Re: bash hash bug
Date: Sun, 19 Nov 2006 21:00:15 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.8) Gecko/20061025 Thunderbird/1.5.0.8 Mnenhy/0.7.4.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Eric Blake on 11/19/2006 8:39 PM:
> POSIX states, under 2.9.1 Command Search and Execution, that for a simple
> command that does not contain slashes, is not a special built-in, is not a
> shell function, and is not in a list of particular utilities, that the
> command to execute is subject to a path search, and that:
> 
> "Once a utility has been searched for and found (either as a result of
> this specific search or as part of an unspecified shell start-up
> activity), an implementation may remember its location and need not search
> for the utility again unless the PATH variable has been the subject of an
> assignment. If the remembered location fails for a subsequent invocation,
> the shell shall repeat the search to find the new location for the
> utility, if any."

POSIX also states that 'set -h' affects hashing by "Locate and remember
utilities invoked by functions as those functions are defined (the
utilities are normally located when the function is executed)."  This
sounds much different than bash's wording that 'set -h' affects "Remember
 the location of commands as they are looked up for execution.  This is
enabled by default."  Sounds like bash DOES have a POSIX-compliance bug
when it comes to hashing.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFYShP84KuGfSFAYARAqz0AKCvl1nBGWkaAKCwVaoIOmrzk57IhACfaCu0
ctRAvC84z4X6D1eoR3pJn8U=
=gjYR
-----END PGP SIGNATURE-----




reply via email to

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