From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17372 invoked from network); 27 Mar 2008 15:40:01 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 27 Mar 2008 15:40:01 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 40696 invoked from network); 27 Mar 2008 15:39:53 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 27 Mar 2008 15:39:53 -0000 Received: (qmail 9730 invoked by alias); 27 Mar 2008 15:39:48 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24766 Received: (qmail 9719 invoked from network); 27 Mar 2008 15:39:47 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 27 Mar 2008 15:39:47 -0000 Received: from vms048pub.verizon.net (vms048pub.verizon.net [206.46.252.48]) by bifrost.dotsrc.org (Postfix) with ESMTP id 6799982CD267 for ; Thu, 27 Mar 2008 16:39:40 +0100 (CET) Received: from torch.brasslantern.com ([71.116.79.77]) by vms048.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JYE00JPTBHD37P0@vms048.mailsrvcs.net> for zsh-workers@sunsite.dk; Thu, 27 Mar 2008 10:39:14 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id m2RFdBjU018429 for ; Thu, 27 Mar 2008 08:39:12 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id m2RFdBY8018428 for zsh-workers@sunsite.dk; Thu, 27 Mar 2008 08:39:11 -0700 Date: Thu, 27 Mar 2008 08:39:11 -0700 From: Bart Schaefer Subject: Re: _canonical_path not working on *BSD In-reply-to: <20080327102325.55808716@news01> To: zsh-workers@sunsite.dk Message-id: <080327083911.ZM18427@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <20080326114413.80713vrmznwpnyuc@bapt.selfip.org> <080326083638.ZM16858@torch.brasslantern.com> <200803261540.m2QFeJmm017381@news01.csr.com> <200803261604.m2QG41Ke017772@news01.csr.com> <200803261621.m2QGLptV017966@news01.csr.com> <20080326173824.0a55c00d@coredump.raveland.priv> <20080326164615.1d5893ed@news01> <20080327102325.55808716@news01> Comments: In reply to Peter Stephenson "Re: _canonical_path not working on *BSD" (Mar 27, 10:23am) X-Virus-Scanned: ClamAV 0.91.2/6424/Thu Mar 27 16:20:33 2008 on bifrost X-Virus-Status: Clean On Mar 27, 10:23am, Peter Stephenson wrote: } } I should make one more point about this before leaving the subject: this } doesn't do everything that "readlink -f" does, in particular it doesn't } remove .. path segments, strip multiple /'s or remove symbolic link } references in intervening directories. } } Luckily, we have the technology, I think. } } We don't need the $(...) for the zstat. It would be quite nice to } be able to get the directory canonicalization without a fork, too. Why do we even need the zstat if we're doing $(cd ...; pwd) ? I used zstat in the first place to avoid having to cd to a directory that might not be readable/executable (though I suppose "umount" would normally be used by root) but if you're going to cd anyway then you can skip the whole "while" loop on zstat and just "pwd -P" once. Or better, try the "pwd -P" first and fall back on the while loop. (Or did your most recent patch do that? I've lost track.) I'm beginning to think this whole exercise is a bad idea anyway. I have visions of sysadmins attempting to umount a misbehaving NFS server or a failing disk and ending up with their session frozen as zsh attempts to access the bad filesystem behind the scenes.