zsh-users
 help / color / mirror / code / Atom feed
* [zsh 3.1.9] history bug?
@ 2000-11-29 13:14 Vincent Lefevre
  2000-11-29 15:50 ` Bart Schaefer
  0 siblings, 1 reply; 9+ messages in thread
From: Vincent Lefevre @ 2000-11-29 13:14 UTC (permalink / raw)
  To: zsh-users

I have zsh 3.1.9 with the following history options:

lepois:~> setopt|grep hist
extendedhistory
histignoredups
histignorespace
histnofunctions
histnostore
histreduceblanks
incappendhistory
lepois:~> unsetopt|grep hist
noappendhistory
nobanghist
cshjunkiehistory
histallowclobber
nohistbeep
histexpiredupsfirst
histfindnodups
histignorealldups
histsavenodups
histverify
sharehistory

But all command lines are not stored to the history (even when the
previous one was different).

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> - 100%
validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des
Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / PolKA research team at LORIA


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [zsh 3.1.9] history bug?
  2000-11-29 13:14 [zsh 3.1.9] history bug? Vincent Lefevre
@ 2000-11-29 15:50 ` Bart Schaefer
  2000-11-29 20:01   ` Mircea Damian
  2000-11-30 14:46   ` Vincent Lefevre
  0 siblings, 2 replies; 9+ messages in thread
From: Bart Schaefer @ 2000-11-29 15:50 UTC (permalink / raw)
  To: zsh-users

On Nov 29,  2:14pm, Vincent Lefevre wrote:
}
} But all command lines are not stored to the history (even when the
} previous one was different).

Can you give an actual example of this, please?

There have been several changes/fixes to history handling since the June
release of 3.1.9, so it may very well be fixed in 3.1.9-dev-7.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [zsh 3.1.9] history bug?
  2000-11-29 15:50 ` Bart Schaefer
@ 2000-11-29 20:01   ` Mircea Damian
  2000-11-29 20:16     ` Matt Armstrong
  2000-11-30 14:46   ` Vincent Lefevre
  1 sibling, 1 reply; 9+ messages in thread
From: Mircea Damian @ 2000-11-29 20:01 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-users

I'm seeing a problem with history too. Ok. It saves history but if for any
reason (like kill -9 when it's saving history) the file .history.LOCK
remains and a process with the pid of zsh is running I will not be able to
login (/bin/zsh is my default shell).

For example I do a shutdown, the system is very busy and zsh receives
SIGHUP from shutdown, it starts to write the history (creates to lock) but
the shutdown sends (after a while) SIGKILL and it doesn't finish (the .LOCK
remains) the system reboots.. and voila I'm not able to login because
sendmail is running with the same PID that zsh had.

Is that ok?

(I have here Linux with glibc-2.1.3 and zsh-3.1.9)

PS: Should I try 3.1.9-dev-7?


On Wed, Nov 29, 2000 at 03:50:02PM +0000, Bart Schaefer wrote:
> On Nov 29,  2:14pm, Vincent Lefevre wrote:
> }
> } But all command lines are not stored to the history (even when the
> } previous one was different).
> 
> Can you give an actual example of this, please?
> 
> There have been several changes/fixes to history handling since the June
> release of 3.1.9, so it may very well be fixed in 3.1.9-dev-7.
> 

-- 
Mircea Damian
E-mails: dmircea@kappa.ro, dmircea@roedu.net
WebPage: http://taz.mania.k.ro/~dmircea/


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [zsh 3.1.9] history bug?
  2000-11-29 20:01   ` Mircea Damian
@ 2000-11-29 20:16     ` Matt Armstrong
  0 siblings, 0 replies; 9+ messages in thread
From: Matt Armstrong @ 2000-11-29 20:16 UTC (permalink / raw)
  To: Mircea Damian; +Cc: Bart Schaefer, zsh-users

On Wed, Nov 29, 2000 at 10:01:34PM +0200, Mircea Damian wrote:
> I'm seeing a problem with history too. Ok. It saves history but if for any
> reason (like kill -9 when it's saving history) the file .history.LOCK
> remains and a process with the pid of zsh is running I will not be able to
> login (/bin/zsh is my default shell).
> 
> For example I do a shutdown, the system is very busy and zsh receives
> SIGHUP from shutdown, it starts to write the history (creates to lock) but
> the shutdown sends (after a while) SIGKILL and it doesn't finish (the .LOCK
> remains) the system reboots.. and voila I'm not able to login because
> sendmail is running with the same PID that zsh had.
> 
> Is that ok?
> 
> (I have here Linux with glibc-2.1.3 and zsh-3.1.9)
> 
> PS: Should I try 3.1.9-dev-7?

It looks like 3.1.9-dev6 will kill the lockfile if it isn't available
for 10 seconds.  So 3.1.9-dev-7 probably fixes your problem.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [zsh 3.1.9] history bug?
  2000-11-29 15:50 ` Bart Schaefer
  2000-11-29 20:01   ` Mircea Damian
@ 2000-11-30 14:46   ` Vincent Lefevre
  2000-11-30 16:44     ` Bart Schaefer
  1 sibling, 1 reply; 9+ messages in thread
From: Vincent Lefevre @ 2000-11-30 14:46 UTC (permalink / raw)
  To: zsh-users

On Wed, Nov 29, 2000 at 15:50:02 +0000, Bart Schaefer wrote:
> On Nov 29,  2:14pm, Vincent Lefevre wrote:
> }
> } But all command lines are not stored to the history (even when the
> } previous one was different).
> 
> Can you give an actual example of this, please?

Here's something similar:

_ open a terminal
zztest 1
zztest 2
_ close the terminal
_ do the same thing

Now, the history contains here:
: 975595084:0;zztest 1
: 975595088:0;zztest 2
: 975595113:0;zztest 1
: 975595128:0;zztest 2

_ open a terminal
zztest 3
zztest 2
zztest 1
_ close the terminal

Now, the history contains here:
: 975595084:0;zztest 1
: 975595088:0;zztest 2
: 975595113:0;zztest 1
: 975595128:0;zztest 2
: 975595167:0;zztest 3
: 975595230:0;zztest 1
: 975595181:0;zztest 2

The problem is that the above two lines are inverted.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> - 100%
validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des
Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / PolKA research team at LORIA


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [zsh 3.1.9] history bug?
  2000-11-30 14:46   ` Vincent Lefevre
@ 2000-11-30 16:44     ` Bart Schaefer
  2000-12-01  8:47       ` Vincent Lefevre
  0 siblings, 1 reply; 9+ messages in thread
From: Bart Schaefer @ 2000-11-30 16:44 UTC (permalink / raw)
  To: zsh-users

On Nov 30,  3:46pm, Vincent Lefevre wrote:
}
} : 975595084:0;zztest 1
} : 975595088:0;zztest 2
} : 975595113:0;zztest 1
} : 975595128:0;zztest 2
} : 975595167:0;zztest 3
} : 975595230:0;zztest 1
} : 975595181:0;zztest 2
} 
} The problem is that the above two lines are inverted.

I can't reproduce this here with 3.1.9-dev-7, but I don't see any
ChangeLog entry that would be directly related. The function that writes
the history file always opens and closes the file for each write (which
means for each line, with incappendhistory) so it shouldn't be an output
buffering problem.

One question would be, what does the history file contain after you've
given *each* of the last three commands, and *before* you close the
third terminal, in your example? With incappendhistory set, each command
should be saved as it is issued, and closing the terminal should not
change the file.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [zsh 3.1.9] history bug?
  2000-11-30 16:44     ` Bart Schaefer
@ 2000-12-01  8:47       ` Vincent Lefevre
  2000-12-01  8:54         ` Vincent Lefevre
  2000-12-01 11:03         ` Wayne Davison
  0 siblings, 2 replies; 9+ messages in thread
From: Vincent Lefevre @ 2000-12-01  8:47 UTC (permalink / raw)
  To: zsh-users

On Thu, Nov 30, 2000 at 16:44:07 +0000, Bart Schaefer wrote:
> One question would be, what does the history file contain after you've
> given *each* of the last three commands, and *before* you close the
> third terminal, in your example? With incappendhistory set, each command
> should be saved as it is issued, and closing the terminal should not
> change the file.

In fact, this is not what happens. Here's another test. All the
commands are typed in the same terminal, and each time, I give
the current history.

zzt 1

: 975660098:0;zzt 1

zzt 2

: 975660098:0;zzt 1

zzt 3

: 975660098:0;zzt 1
: 975660120:0;zzt 3

zzt 4

: 975660098:0;zzt 1
: 975660120:0;zzt 3

zzt 5

: 975660098:0;zzt 1
: 975660120:0;zzt 3
: 975660140:0;zzt 5

zzt 6

: 975660098:0;zzt 1
: 975660120:0;zzt 3
: 975660140:0;zzt 5

zzt 7

: 975660098:0;zzt 1
: 975660120:0;zzt 3
: 975660140:0;zzt 5
: 975660154:0;zzt 7

zzt 8

: 975660098:0;zzt 1
: 975660120:0;zzt 3
: 975660140:0;zzt 5
: 975660154:0;zzt 7

and now, after closing the terminal:

: 975660098:0;zzt 1
: 975660120:0;zzt 3
: 975660140:0;zzt 5
: 975660154:0;zzt 7
: 975660108:0;zzt 2
: 975660132:0;zzt 4
: 975660148:0;zzt 6
: 975660161:0;zzt 8

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> - 100%
validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des
Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / PolKA research team at LORIA


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [zsh 3.1.9] history bug?
  2000-12-01  8:47       ` Vincent Lefevre
@ 2000-12-01  8:54         ` Vincent Lefevre
  2000-12-01 11:03         ` Wayne Davison
  1 sibling, 0 replies; 9+ messages in thread
From: Vincent Lefevre @ 2000-12-01  8:54 UTC (permalink / raw)
  To: zsh-users

On Fri, Dec 01, 2000 at 09:47:48 +0100, Vincent Lefevre wrote:
> and now, after closing the terminal:
> 
> : 975660098:0;zzt 1
> : 975660120:0;zzt 3
> : 975660140:0;zzt 5
> : 975660154:0;zzt 7
> : 975660108:0;zzt 2
> : 975660132:0;zzt 4
> : 975660148:0;zzt 6
> : 975660161:0;zzt 8

Note: I did this test using "less .zhistory" from zsh. In case this
could have an importance, I did the same test but using tcsh to get
the history, and I got the same results.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> - 100%
validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des
Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / PolKA research team at LORIA


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [zsh 3.1.9] history bug?
  2000-12-01  8:47       ` Vincent Lefevre
  2000-12-01  8:54         ` Vincent Lefevre
@ 2000-12-01 11:03         ` Wayne Davison
  1 sibling, 0 replies; 9+ messages in thread
From: Wayne Davison @ 2000-12-01 11:03 UTC (permalink / raw)
  To: Vincent Lefevre; +Cc: zsh-users

IIRC, this bug was fixed back in July:

2000-07-17  Wayne Davison  <wayned@users.sourceforge.net>
 
        * 12265: Src/hist.c: Fixed gethistent().

In the case you cite, the gethistent() function would sometimes fail when
called from savehistfile().

..wayne..


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2000-12-01 11:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-29 13:14 [zsh 3.1.9] history bug? Vincent Lefevre
2000-11-29 15:50 ` Bart Schaefer
2000-11-29 20:01   ` Mircea Damian
2000-11-29 20:16     ` Matt Armstrong
2000-11-30 14:46   ` Vincent Lefevre
2000-11-30 16:44     ` Bart Schaefer
2000-12-01  8:47       ` Vincent Lefevre
2000-12-01  8:54         ` Vincent Lefevre
2000-12-01 11:03         ` Wayne Davison

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).