Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: History file locking?
- X-seq: zsh-workers 905
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: A.Main@xxxxxxxxxxxxxxxxx (Zefram)
- Subject: Re: History file locking?
- Date: Wed, 10 Apr 1996 14:41:39 +0200 (MET DST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx (zsh-workers)
- In-reply-to: <19260.199604101212@xxxxxxxxxxxxxxxxxxxxxxx> from Zefram at "Apr 10, 96 01:12:15 pm"
- Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary
- Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368
> >In order to keep Zsh from trashing its history file, I have
> >implemented the following local patch. Perhaps this can be worked
> >into the source tree? This patch uses the fcntl() function to lock
> >the entire contents of the history file during read and write
> >operations, using the corresponding blocking read and write locks.
>
> I think it's a good idea, but the patch can't be included as-is. There
> needs to be a configure test to check if this type of locking is
> available, and perhaps to try using flock() as a backup mechanism, if
> available.
Also things get quite complicated when the history file is on an NFS volume.
Probaly some dot-locking method similar to the one used by sendmail & co
should be used.
Bye,
Zoltan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author