Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Dec 1996 10:30:45 +0100 (MET)
From:      J Wunsch <j@uriah.heep.sax.de>
To:        bde@zeta.org.au (Bruce Evans)
Cc:        Helbig@MX.BA-Stuttgart.De, roberto@keltia.freenix.fr, freebsd-bugs@FreeBSD.org
Subject:   Re: bin/2331: strange output of sh's pwd on symlinked directories
Message-ID:  <199612310930.KAA23702@uriah.heep.sax.de>
In-Reply-To: <199612310631.RAA26286@godzilla.zeta.org.au> from Bruce Evans at "Dec 31, 96 05:31:04 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
As Bruce Evans wrote:

> >It is not really a bug, jsust use a modern shell :-)
> 
> It is really a bug.  sh's pwd used to be equivalent to /bin/pwd.  Now
> it is broken after `cd symlink; cd ..'.

That's not a bug.  That's ksh compatible now, whether you like it or
not. :-}  Since ksh is Posix, it cannot be a bug, by definition. :-P

I always hated this ksh braindeadness where you gotta explicitly call
/bin/pwd if you want the ``canonical pathname''.  However, since Posix
has sanctioned all bugfeatures of Mr. Korn, we have to live with this
situation anyway.  Our /bin/sh used to be one of the last remaining
shells where the output of the builtin pwd was still similar to
/bin/pwd (no surprise, since it did call /bin/pwd!).  All the other
remaining shells on our platform didn't do it:

j@uriah 381% sh
$ pwd
/usr/src/sys
$ j@uriah 382% ksh
$ pwd
/sys
$ j@uriah 383% zsh
uriah% pwd
/sys
uriah% 
j@uriah 384% bash
bash$ pwd
/sys
bash$ exit

(My /bin/sh still seems to be the old version.  Mmmmaybe.)

Speaking about shells, there used to be a pointer to a BSD version of
the genuine ksh which i eventually lost.  Can somebody point me again
to it?

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612310930.KAA23702>