bug-bash
[Top][All Lists]
Advanced

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

Re: [POSIX conformance] "." looks for file in the current directory


From: Eric Blake
Subject: Re: [POSIX conformance] "." looks for file in the current directory
Date: Tue, 10 Jun 2008 06:21:13 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080421 Thunderbird/2.0.0.14 Mnenhy/0.7.5.666

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

According to Andreas Schwab on 6/10/2008 3:20 AM:
| Stephane_Chazelas@yahoo.fr writes:
|
|> SUSv3> Some older implementations searched the current directory
|> SUSv3> for the file, even if the value of PATH disallowed it.

Yes, bash has a bug here, to the point that even Autoconf documents bash's
bug:
http://www.gnu.org/software/autoconf/manual/html_node/Limitations-of-Builtins.html#Limitations-of-Builtins

|
| Ironically, the example just before the rationale depends exactly on
| finding the file in the current directory.

But I submitted a defect report on that very fact several months ago, and
that example has been corrected in the 200x draft of POSIX:

Search for "Number 164" in
http://www.opengroup.org/austin/aardvark/latest/xcubug2.txt

The corrected example reads:

cat foobar
foo=hello bar=world
. ./foobar
echo $foo $bar
hello world

- --
Don't work too hard, make some time for fun as well!

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

iEYEARECAAYFAkhOcbgACgkQ84KuGfSFAYBlVQCgzCznTSH1l4TtA+5mnbuoDfVE
xZkAn1dISfpVL6/ZGMJJ0SCD8Kb3aVKG
=KftW
-----END PGP SIGNATURE-----




reply via email to

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