On Tue, Apr 15, 2008 at 05:31:20PM +0200, Vincent Lefevre wrote: > I no longer get the error > > zsh: failed to write history file /home/vlefevre/.zhistory: bad file descriptor I fixed the bogus "bad file descriptor" part of that error back on March 6th, as well as making some minor improvements to the errors. I'd like to see what the real error is when your flock patch is not present. I personally think this patch goes too far. There is a lockhistfile() call that is done to give a particular shell exclusive control over the history files. I'd prefer to see nay extra locking done there. Attached is an alternative patch for the Src/utils.c file that implements this (it is easier to see what I've done than diffing it against the file with the current fcntl changes). Let me know what you think. Additional discussion: I think the option name should be made more generic so that it can be made to support more types of file locking, such as the flock() call. Perhaps call it HIST_EXTRA_LOCKING? ..wayne..