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

Re: revisiting history-file rewriting



On Fri, Mar 18, 2005 at 10:49:08AM +0000, Peter Stephenson wrote:
> How would this change the result when multiple shells exit at once?
> I'm not entirely clear how the locking affects the fact that multiple
> shells want to rewrite the file in this case.

It doesn't change that behavior except to make it safer -- if zsh is
forcefully killed it might be in the middle of writing out a new copy of
the history file instead of a truncated version of the real history
file.

Note also that for anyone using one of the history-appending options
that I've already eliminated the multi-shell locking contention at
system shutdown time because zsh no longer tries to rewrite the history
file on a kill signal (and doesn't need to touch the history file at all
if it has no history data left to append).

..wayne..



Messages sorted by: Reverse Date, Date, Thread, Author