From owner-cvs-all Sat May 18 8:20:53 2002 Delivered-To: cvs-all@freebsd.org Received: from Awfulhak.org (gw.Awfulhak.org [217.204.245.18]) by hub.freebsd.org (Postfix) with ESMTP id 495FB37B401; Sat, 18 May 2002 08:20:45 -0700 (PDT) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [IPv6:fec0::1:12]) by Awfulhak.org (8.12.3/8.12.3) with ESMTP id g4IFKhva041732; Sat, 18 May 2002 16:20:43 +0100 (BST) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.12.3/8.12.3) with ESMTP id g4IFKbWs010806; Sat, 18 May 2002 16:20:37 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200205181520.g4IFKbWs010806@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: "Tim J. Robbins" Cc: Brian Somers , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, brian@Awfulhak.org Subject: Re: cvs commit: src/bin/pwd pwd.1 pwd.c In-Reply-To: Message from "Tim J. Robbins" of "Sat, 18 May 2002 23:43:46 +1000." <20020518234346.A16088@treetop.robbins.dropbear.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 18 May 2002 16:20:37 +0100 From: Brian Somers Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > On Sat, May 18, 2002 at 11:30:09AM +0100, Brian Somers wrote: > > > > tjr 2002/05/17 19:47:25 PDT > > > > > > Modified files: > > > bin/pwd pwd.1 pwd.c > > > Log: > > > Make -L the default, allow both -L and -P to be specified (last one used > > > matters), fall back to -P mode if we can't get the logical directory. > > > > > > Revision Changes Path > > > 1.19 +2 -2 src/bin/pwd/pwd.1 > > > 1.18 +14 -9 src/bin/pwd/pwd.c > > > > I don't think this is wise. I've always been of the understanding > > that ``pwd'' gives me my logical directory and ``/bin/pwd'' gives me > > the physical one. I've written scripts to depend on this. > > Ok, I will restore -P as the default for the moment. I understand that > /bin/pwd has historically used getcwd() or similar, but I wasn't aware > that anything would break if pwd gave the logical directory name by default. > > What assumptions do the scripts make that would no longer work if -L > was the default? Well, the scripts just assume that /bin/pwd does a getcwd() -- looking at $PWD (which seems to be how -L is implemented) is something that the script can do to figure out the logical directory. I can't remember exactly why the scripts needed the real directory - just that they wanted to know if [ "$PWD" != $(/bin/pwd) ]. Doesn't POSIX or one of the other standards mandate which one is presented by default ? I'm happy to be overruled for a good reason. > Tim -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message