From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3) with ESMTP id HAA27412 for ; Thu, 11 Apr 1996 07:46:29 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id RAA20290; Wed, 10 Apr 1996 17:40:57 -0400 (EDT) Resent-Date: Wed, 10 Apr 1996 17:40:57 -0400 (EDT) From: schaefer@z-code.ncd.com (Barton E. Schaefer) Message-Id: <960410144122.ZM17336@zyrcon.z-code.com> Date: Wed, 10 Apr 1996 14:41:22 -0700 In-Reply-To: Zoltan Hidvegi "Re: History file locking?" (Apr 10, 11:21pm) References: <199604102121.XAA08127@bolyai.cs.elte.hu> Reply-To: schaefer@z-code.ncd.com X-Face: czU|*h"p8AX?4.I.yU.^s%TIMx|"-s,*'|#H^|e,QjE&!jL%<]:-.U/;khS%3a2BC5_d#)( mz=$$G0u9P&*N8cA~b[URf;lgKRif@#qEf[ltie#Gg0%6$b`e`k.Cgw:\qJx\\a7c(K7^3;gXW:e1@ J Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/914 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Apr 10, 11:21pm, Zoltan Hidvegi wrote: } Subject: Re: History file locking? } } If the link fails, check the validity of the lock (the lock file should } contain the PID of the locking process) using kill(0, lock_pid). If the } lock is invalid, remove it and repeat step 2. That doesn't work when the competing processes are on two different machines. You can only reliably remove lock files by timing them out based on the date of the file. A process that wants to hang onto a lock has to touch the lock file periodically to keep its date current. -- Bart Schaefer Vice President, Technology, Z-Code Software schaefer@z-code.com Division of NCD Software Corporation http://www.well.com/www/barts