Date: Wed, 7 Nov 2007 00:31:42 +0100 From: Jilles Tjoelker <jilles@stack.nl> To: "Julian H. Stacey" <jhs@berklix.org> Cc: hackers@freebsd.org, Harti Brandt <harti@freebsd.org> Subject: Re: make: evaluation of symbolic link with ../ fails Message-ID: <20071106233142.GA48427@stack.nl> In-Reply-To: <200711061620.lA6GKE8L090019@fire.js.berklix.net> References: <200711050002.lA502KUe064392@fire.js.berklix.net> <20071105085259.A39496@knop-beagle.kn.op.dlr.de> <200711061620.lA6GKE8L090019@fire.js.berklix.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Nov 06, 2007 at 05:20:14PM +0100, Julian H. Stacey wrote: > It seems to me that all except csh (including bourne shell !) are > broken !! Amazing ! None of them cope properly actually following > symbolic links, they all make false premise the /some_path/.. == > /some_path ! This may be a little confusing, but is indeed the defined POSIX behaviour for pwd and cd. $PWD is used to store the "logical" path (potentially containing symlinks) that was cd'ed to. You can avoid the special behaviour with the -P (physical) option. cd -P will not treat symlinks specially and store a pathname not containing symlinks in $PWD; pwd -P will ignore $PWD and show a pathname not containing symlinks. A further thing to note is that csh does not have a pwd builtin (you are supposed to use dirs or prompt substitutions apparently) and that FreeBSD's /bin/pwd has the -P behaviour by default (you need -L to make it use $PWD). -- Jilles Tjoelker
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071106233142.GA48427>