zsh-workers
 help / color / mirror / code / Atom feed
From: Wayne Davison <wayned@users.sourceforge.net>
To: Andrey Borzenkov <arvidjaar@newmail.ru>
Cc: zsh-workers@sunsite.dk
Subject: Re: revisiting history-file rewriting
Date: Fri, 18 Mar 2005 09:51:45 -0800	[thread overview]
Message-ID: <20050318175145.GC5500@blorf.net> (raw)
In-Reply-To: <200503181918.30617.arvidjaar@newmail.ru>

On Fri, Mar 18, 2005 at 07:18:25PM +0300, Andrey Borzenkov wrote:
> I have a bunch of [.zsh_history.XXXXXX files]
> with contents like "9354 localhost.localdomain"

You must manually remove them.  I'm curious why you're getting a regular
occurrence of them, though.  Do you not use any of the history-appending
options (e.g. APPEND_HISTORY or SHARE_HISTORY)?  These temp files should
only remain if zsh gets killed while it is waiting for the *.LOCK file,
and a zsh that is appending history will not try to re-write the history
file when it has received a signal telling it to die, so that usually
avoids these droppings.  If no history-appending option is specified,
then having multiple zshs running when the system goes down does tend to
cause these files to be left around.

The locking algorithm has an alternate code section that avoids the
creation of a temporary file, but I think that this alternative might
not be good for NFS (since it relies on O_EXCL).  Perhaps we should
make this locking choice an option instead of conditionally compiled?

This discussion reminded me of why I originally chose to use the name
$HISTFILE.new instead of a unique name for rewriting the history file:
it avoids extra copies of the history file lying around when zsh gets
killed during the rewriting (and since this should only happen if the
user does not have a history-appending option enabled, it doesn't cause
the loss of any extra information that wouldn't have already been lost
by the multiple zsh processes all overwriting each others history
file).

..wayne..


  reply	other threads:[~2005-03-18 17:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-16 20:40 Wayne Davison
2005-03-17  2:09 ` Geoff Wing
2005-03-17  2:49   ` Wayne Davison
2005-03-18 16:18     ` Andrey Borzenkov
2005-03-18 17:51       ` Wayne Davison [this message]
2005-03-18 18:02         ` Wayne Davison
2005-03-17 18:03 ` Bart Schaefer
2005-03-18 18:19   ` Wayne Davison
2005-03-18 21:15     ` Bart Schaefer
2005-03-18 21:47       ` Wayne Davison
2005-03-18 10:49 ` Peter Stephenson
2005-03-18 17:58   ` Wayne Davison
2005-03-18 18:24     ` Peter Stephenson
2005-03-18 22:53 ` Wayne Davison
2005-03-20  1:57   ` Bart Schaefer
2005-03-21 10:39     ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050318175145.GC5500@blorf.net \
    --to=wayned@users.sourceforge.net \
    --cc=arvidjaar@newmail.ru \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).