From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20783 invoked from network); 18 Apr 2008 01:00:11 -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; 18 Apr 2008 01:00:11 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 1913 invoked from network); 18 Apr 2008 01:00:07 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 18 Apr 2008 01:00:07 -0000 Received: (qmail 16391 invoked by alias); 18 Apr 2008 01:00:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24835 Received: (qmail 16362 invoked from network); 18 Apr 2008 01:00:04 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 18 Apr 2008 01:00:04 -0000 Received: from prunille.vinc17.org (vinc17.pck.nerim.net [213.41.242.187]) by bifrost.dotsrc.org (Postfix) with ESMTP id 1B2518043AC7 for ; Fri, 18 Apr 2008 03:00:00 +0200 (CEST) Received: by prunille.vinc17.org (Postfix, from userid 501) id ED50021ABE14; Fri, 18 Apr 2008 02:59:59 +0200 (CEST) Date: Fri, 18 Apr 2008 02:59:59 +0200 From: Vincent Lefevre To: zsh-workers@sunsite.dk Subject: Re: [PATCH] history locking with fcntl Message-ID: <20080418005959.GB1067@prunille.vinc17.org> Mail-Followup-To: zsh-workers@sunsite.dk References: <20080415153120.GE1223@prunille.vinc17.org> <20080417162307.GB22594@blorf.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080417162307.GB22594@blorf.net> X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.17-vl-r21552 (2008-03-11) X-Virus-Scanned: ClamAV 0.91.2/6815/Fri Apr 18 01:56:17 2008 on bifrost X-Virus-Status: Clean On 2008-04-17 09:23:07 -0700, Wayne Davison wrote: > I fixed the bogus "bad file descriptor" part of that error back on March > 6th, as well as making some minor improvements to the errors. I'd like > to see what the real error is when your flock patch is not present. Note: it's fcntl, not flock (flock does not lock over NFS). If I do not set the option (which is equivalent to not using the patch), then I get immediate history corruption when using two machines (well, at least 64-bit ones), 100% reproducible. > Attached is an alternative patch for the Src/utils.c file that > implements this (it is easier to see what I've done than diffing it > against the file with the current fcntl changes). Let me know what > you think. I'll try it. > Additional discussion: I think the option name should be made more > generic so that it can be made to support more types of file locking, > such as the flock() call. Perhaps call it HIST_EXTRA_LOCKING? Yes, perhaps. But this would give the user less control on the lock mechanisms. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)