From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19173 invoked from network); 17 Apr 2008 13:58:51 -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=AWL,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; 17 Apr 2008 13:58:51 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 91181 invoked from network); 17 Apr 2008 13:58:46 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 17 Apr 2008 13:58:46 -0000 Received: (qmail 28514 invoked by alias); 17 Apr 2008 13:58:44 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24828 Received: (qmail 28498 invoked from network); 17 Apr 2008 13:58:43 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 17 Apr 2008 13:58:43 -0000 Received: from vms040pub.verizon.net (vms040pub.verizon.net [206.46.252.40]) by bifrost.dotsrc.org (Postfix) with ESMTP id DD9BE8043AC7 for ; Thu, 17 Apr 2008 15:58:35 +0200 (CEST) Received: from torch.brasslantern.com ([71.116.74.146]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JZH00LOP307XW00@vms040.mailsrvcs.net> for zsh-workers@sunsite.dk; Thu, 17 Apr 2008 09:02:32 -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 m3HDwYMH009195 for ; Thu, 17 Apr 2008 06:58:35 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id m3HDwYkM009194 for zsh-workers@sunsite.dk; Thu, 17 Apr 2008 06:58:34 -0700 Date: Thu, 17 Apr 2008 06:58:34 -0700 From: Bart Schaefer Subject: Re: [PATCH] history locking with fcntl In-reply-to: <20080417104054.295003e3@news01> To: zsh-workers@sunsite.dk Message-id: <080417065834.ZM9193@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <20080415153120.GE1223@prunille.vinc17.org> <20080417104054.295003e3@news01> Comments: In reply to Peter Stephenson "Re: [PATCH] history locking with fcntl" (Apr 17, 10:40am) X-Virus-Scanned: ClamAV 0.91.2/6810/Thu Apr 17 13:25:25 2008 on bifrost X-Virus-Status: Clean On Apr 17, 10:40am, Peter Stephenson wrote: } } pindex(HIST_FCNTL_LOCK) } provide better performance, in particular avoiding history corruption when } files are stored on NFS. Really? Traditionally fcntl() has been a lousy way to lock over NFS. Procmail, for example, has acres of code to handle using secondary files as semaphores precisely because nothing else was reliable over NFS (more specifically, only creat() was guaranteed to be atomic and lock daemons were flaky). I guess my point is that while fcntl() may be good on recent OSs (or recent versions of NFS, more likely) it's dangerous in an environment where you don't know what the NFS server is using (no matter how recent the local NFS client is).