Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Feb 1995 18:40:39 +0100 (MET)
From:      j@uriah.sax.de (J Wunsch)
To:        CVS-commiters@freefall.cdrom.com, cvs-lib@freefall.cdrom.com
Subject:   Re: cvs commit: src/lib/libc/gen getcwd.c
Message-ID:  <199502061740.SAA17055@bonnie.tcd-dresden.de>
In-Reply-To: <199502050848.TAA12928@godzilla.zeta.org.au> from "Bruce Evans" at Feb 5, 95 07:48:28 pm

next in thread | previous in thread | raw e-mail | index | archive | help
As Bruce Evans wrote:
| 
| >> Our manpage says that getcwd() returns "the" absolute pathname but POSIX
| >> says that it returns "an" absolute pathname.  ++POSIX; --BSD; :-).
| 
| >so what's your verdict ?
| 
| Fix the manpage and see what happens in practice with the faster getcwd.

I hate it.

Even if Posix does not require it, all the systems i've seen so far
handle it as it used to be: getcwd() [or pwd(1)] returns the canonical
path name.  If people wish to have a ``fast pwd'' they are free to
create an ``alias pwd echo \$cwd'', i personally prefer ``dirs'' to
see the shell's idea of the working directory while i mentally rely on
(/bin/)pwd returning the canonical path name.

Without this feature, there's no easy way to find out the canonical
path name, except of manually tracking each single directory level in
the returned absolute path name.

-- 
cheers, J"org                             work:      --- no longer ---
                                          private:   joerg_wunsch@uriah.sax.de

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?199502061740.SAA17055>