Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: locking failed for /home/whoever/.zhistory: no such file or directory



On Wed, 13 Jul 2011 08:50:07 -0500
Cesar Romani <cesar.romani@xxxxxxxxx> wrote:
> On 10/07/2011 11:53 a.m., Peter Stephenson wrote:
>  > Cesar Romani wrote:
>  >> I'm using zsh 4.3.12-dev-1
>  >> Whenever I start zsh I always get the following message:
>  >> zsh: locking failed for /home/whoever/.zhistory: no such file or
>  >> directory: reading anyway
>  >
>  > That means a system call to lock the file for reading failed.  It
>  > depends on the file system whether locking is enabled.  So long as you
>  > are not attempting to use the history file with multiple terminals at
>  > once, you shouldn't hit problems.
> 
> But my .zhistory is always empty. Isn't there a workaround for it?
> With zsh 4.3.10 I didn't have that problem.

You did have the problem, but the shell didn't warn you it wasn't going
to be able to manage history safely.

Is there a good reason you need to have the .zhistory file even though
it's empty?  If not, delete it, or if this means you aren't using
history files at all unset HISTFILE in ~/.zshrc.

If there's a good reason to have a valid HISTFILE variable pointing to a
file that's empty, we can add a special case to test for a zero file
before reading, but I can't offhand think of a case why you need this.

-- 
Peter Stephenson <pws@xxxxxxx>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog



Messages sorted by: Reverse Date, Date, Thread, Author