Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: History file locking?
- X-seq: zsh-workers 914
- From: schaefer@xxxxxxxxxxxxxx (Barton E. Schaefer)
- To: zsh-workers@xxxxxxxxxxxxxxx
- Subject: Re: History file locking?
- Date: Wed, 10 Apr 1996 14:41:22 -0700
- In-reply-to: Zoltan Hidvegi <hzoli@xxxxxxxxxx> "Re: History file locking?" (Apr 10, 11:21pm)
- References: <199604102121.XAA08127@xxxxxxxxxxxxxxxxx>
- Reply-to: schaefer@xxxxxxxxxxxxxx
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@xxxxxxxxxx Division of NCD Software Corporation
http://www.well.com/www/barts
Messages sorted by:
Reverse Date,
Date,
Thread,
Author