Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bug: can't write history file
- X-seq: zsh-workers 22903
- From: Dmitry Karasik <dmitry@xxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: bug: can't write history file
- Date: Tue, 24 Oct 2006 18:15:06 +0200
- In-reply-to: <20061024152718.GD17113@xxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20061024141740.GA18951@xxxxxxxxxxxxxxxxxxxxx> <20061024152718.GD17113@xxxxxxxxx>
- Reply-to: dmitry@xxxxxxxxxxxxxx
On Tue, Oct 24, 2006 at 08:27:18AM -0700, Wayne Davison wrote:
> On Tue, Oct 24, 2006 at 04:17:40PM +0200, Dmitry Karasik wrote:
> > I found that it is savehistfile() to blame, because it apparently is
> > called with writeflags=0, which bypasses all append/rewrite logic
>
> This is as it should be, because that code is re-writing the history
> file to trim it. As long as you use HIST_APPEND or SHARE_HISTORY, the
> history from a root session should be added to the file -- just the
> rewrite at the end will be skipped.
That is possibly true, however before changing the code I did play with
HIST_APPEND and SHARE_HISTORY and I cannot confirm that setting these option
will work. To support this, as far as I can see in the code,
"isset(APPENDHISTORY)" or "isset(SHAREHISTORY)" are only checked when
"writeflags & HFILE_USE_OPTIONS", which is actually never true in the second
call.
> That line is the same in 4.2, so I presume what has changed is the
> default options (how it reaches this code). In that case it's
> plausible that this should always have had that flag.
I'm not sure what caused this problem not to appear in the previous versions,
but if you insist that this is the configuration problem, I'd like to ask you
to send me a minimalistic .zshenv that will not trigger the error and will save
the history correctly both under root and non-root.
--
Sincerely,
Dmitry Karasik
Messages sorted by:
Reverse Date,
Date,
Thread,
Author