zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@ny.frontiercomm.net>
To: zsh-workers@math.gatech.edu (Zsh hacking and development)
Subject: Re: History bug still present in 3.0.3-test5
Date: Sun, 11 May 1997 02:13:51 -0400 (EDT)	[thread overview]
Message-ID: <199705110613.CAA05937@hzoli.home> (raw)
In-Reply-To: <970510221515.ZM15578@candle.brasslantern.com> from Bart Schaefer at "May 10, 97 10:15:15 pm"

> I applied this patch and tried the xterm -e test above, and once again got
> a truncated-to-zero history file.  So whatever is going on isn't related
> to this patch.  And it happens with `zsh -f -l' too, so it's not some odd
> thing I'm doing.
> 
> Here's a more complete stack trace.  3.0.3-test5 with the patch from your
> message applied.  I only see zexit in there once, called from handler(),
> so I don't think zsh has seen the EOF yet.

Yes, this trace is different from the trace you sent earlier.  I was now
able to reproduce the bug.  The bug does not happen when HISTSIZE ==
SAVEHIST and the history file is full (i.e. has as least SAVEHIST lines),
that's why I did not see the bug before.  Here is an other fix.

Zoltan


*** Src/hist.c	1997/05/07 08:25:04	3.1.2.3
--- Src/hist.c	1997/05/11 06:08:08
***************
*** 1484,1490 ****
      else
  	out = fdopen(open(unmeta(s), O_CREAT | O_WRONLY | O_TRUNC, 0600), "w");
      if (out) {
! 	for (; ev <= curhist; ev++) {
  	    ent = gethistent(ev);
  	    if (app & 2) {
  		if (ent->flags & HIST_OLD)
--- 1484,1490 ----
      else
  	out = fdopen(open(unmeta(s), O_CREAT | O_WRONLY | O_TRUNC, 0600), "w");
      if (out) {
! 	for (; ev <= curhist - !!histactive; ev++) {
  	    ent = gethistent(ev);
  	    if (app & 2) {
  		if (ent->flags & HIST_OLD)


      reply	other threads:[~1997-05-11  6:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-05-10 17:40 Bart Schaefer
1997-05-11  3:14 ` Zoltan Hidvegi
1997-05-11  5:15   ` Bart Schaefer
1997-05-11  6:13     ` Zoltan Hidvegi [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=199705110613.CAA05937@hzoli.home \
    --to=hzoli@ny.frontiercomm.net \
    --cc=zsh-workers@math.gatech.edu \
    /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).