From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24383 invoked from network); 17 Apr 2008 09:41:13 -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.3 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 09:41:13 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 9527 invoked from network); 17 Apr 2008 09:41:09 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 17 Apr 2008 09:41:09 -0000 Received: (qmail 7667 invoked by alias); 17 Apr 2008 09:41:07 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24824 Received: (qmail 7655 invoked from network); 17 Apr 2008 09:41:07 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 17 Apr 2008 09:41:06 -0000 Received: from cluster-g.mailcontrol.com (cluster-g.mailcontrol.com [85.115.41.190]) by bifrost.dotsrc.org (Postfix) with ESMTP id 0DB57808A389 for ; Thu, 17 Apr 2008 11:40:52 +0200 (CEST) Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly14g.srv.mailcontrol.com (MailControl) with ESMTP id m3H9cRag006681 for ; Thu, 17 Apr 2008 10:40:58 +0100 Received: from news01 ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Thu, 17 Apr 2008 10:40:54 +0100 Date: Thu, 17 Apr 2008 10:40:54 +0100 From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: [PATCH] history locking with fcntl Message-ID: <20080417104054.295003e3@news01> In-Reply-To: <20080415153120.GE1223@prunille.vinc17.org> References: <20080415153120.GE1223@prunille.vinc17.org> Organization: CSR X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.5; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 17 Apr 2008 09:40:54.0484 (UTC) FILETIME=[218E3140:01C8A06F] X-Scanned-By: MailControl A-08-00-04 (www.mailcontrol.com) on 10.71.0.124 X-Virus-Scanned: ClamAV 0.91.2/6801/Wed Apr 16 18:40:47 2008 on bifrost X-Virus-Status: Clean On Tue, 15 Apr 2008 17:31:20 +0200 Vincent Lefevre wrote: > I've rewritten my patch to lock the history with fcntl, and added > an option. It works well with my settings (INC_APPEND_HISTORY), but > I haven't tested it with other settings. Thanks, I've committed it with modified documentation. It will no doubt need some field testing. I think ftruncate() probably needs a configure test. I haven't done this yet. pindex(HIST_FCNTL_LOCK) item(tt(HIST_FCNTL_LOCK))( When writing out the history file, by default zsh uses ad-hoc file locking to avoid known problems with locking on some operating systems. With this option locking is done by means of the system's tt(fcntl) call, where this method is available. On recent operating systems this may provide better performance, in particular avoiding history corruption when files are stored on NFS. ) -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070