zsh-users
 help / color / mirror / code / Atom feed
From: Vincent Lefevre <vincent@vinc17.org>
To: zsh-users@sunsite.dk
Subject: Re: History corruption (over NFS)
Date: Tue, 15 Feb 2005 10:58:41 +0100	[thread overview]
Message-ID: <20050215095841.GE19378@ay.vinc17.org> (raw)
In-Reply-To: <20050214185705.GC6444@blorf.net>

On 2005-02-14 10:57:05 -0800, Wayne Davison wrote:
> A little while ago I wrote a patch that caused zsh to change its
> rewriting strategy to use a HISTORY_FILE.new file and then rename it
> into place. The purpose of this patch is to avoid losing any history
> if zsh gets interrupted during the writing of the new history file.
> However, it should also be a friendlier update strategy for NFS dirs
> because the inode of the file changes.

Will the other NFS clients necessarily notice the inode change?

Anyway it seems that this solution would work. I did a test with
Emacs, which changes the inode when modifying a file, simulating
what zsh does by removing some .zhistory lines at the beginning,
and there was no problem with NFS.

> The downside is that it can undo some user's use of symlinks,
> hardlinks, or special group permissions on their history file
> (because it is replacing the history file instead of rewriting it
> in-place). Perhaps this algorithm should be made optional?

Making it optional would be a good idea, much better than requiring
some mount options (which can slow down other applications...).

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


      parent reply	other threads:[~2005-02-15  9:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-10 16:54 Vincent Lefevre
2005-02-10 18:41 ` Bart Schaefer
2005-02-10 23:54   ` Vincent Lefevre
2005-02-14 15:56   ` Vincent Lefevre
2005-02-14 16:24     ` Bart Schaefer
2005-02-15  9:50       ` Vincent Lefevre
2005-02-15 16:15         ` Bart Schaefer
2005-02-14 18:57     ` Wayne Davison
2005-02-14 21:06       ` Seth Kurtzberg
2005-02-14 22:33         ` Wayne Davison
2005-02-15  9:58       ` Vincent Lefevre [this message]

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=20050215095841.GE19378@ay.vinc17.org \
    --to=vincent@vinc17.org \
    --cc=zsh-users@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).