Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: History file locking?



> >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