From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22059 invoked by alias); 18 Dec 2009 10:27:08 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27530 Received: (qmail 22258 invoked from network); 18 Dec 2009 10:26:56 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.2.5 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Fri, 18 Dec 2009 10:25:12 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Unable to read history on latest Cygwin Message-ID: <20091218102512.540c0c87@news01> In-Reply-To: <733654e30912171200g1f135030j5d3f978648caca70@mail.gmail.com> References: <1260800369.32429.1350005931@webmail.messagingengine.com> <733654e30912160754q5e505cabo4a2510b41bf1d892@mail.gmail.com> <733654e30912171200g1f135030j5d3f978648caca70@mail.gmail.com> Organization: CSR X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.8; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 18 Dec 2009 10:25:12.0370 (UTC) FILETIME=[61C2E920:01CA7FCC] X-Scanned-By: MailControl A-09-22-10 (www.mailcontrol.com) on 10.71.0.133 On Thu, 17 Dec 2009 12:00:25 -0800 Wayne Davison wrote: > On Wed, Dec 16, 2009 at 7:54 AM, Wayne Davison <4wayned@gmail.com> wrote: > > > According to various web docs, symlinks are atomic on NFS, so that might be > > a good thing to use in general (replacing the use of link()). > > > > Attached is my patch for adding preferential use of a symlink as the locking > mechanism. This should interoperate just fine with a hard-link creating > locker, but sadly, will have issues if another locker is using open with > O_EXCL. I've made the symlink name "/pid-$PID/host-$HOST" in an attempt to > make a create (open) over an existing symlink fail with an error (unless the > /pid-$PID dir happens to exist and is writable). We could try to add > O_NOFOLLOW (when available) to the O_EXCL-open as well. However, hopefully > no system will exist where one zsh locker is trying to use open-locking and > another is trying to use a link-locking idiom. > > What do you think? Dangerous? Useful? (I moved this to zsh-workers.) What about the historical behaviour of zsh? Are there old versions of the shell that might do something inconsistent with this? This is not a typical problem for most users, anyway, but it would be good not to stir things up unnecessarily. Other than that I can't think of any aspect that looks particularly dangerous. We could limit this to both HAVE_LINK and HAVE_SYMLINK to ensure it didn't change the behaviour on systems without link()---slightly illogical but unlikely to be a real limitation on the most common systems. -- Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom