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

Re: [PATCH] history locking with fcntl



On Tue, 15 Apr 2008 17:31:20 +0200
Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> I've rewritten my patch to lock the history with fcntl, and added
> an option. It works well with my settings (INC_APPEND_HISTORY), but
> I haven't tested it with other settings.

Thanks, I've committed it with modified documentation.  It will no doubt
need some field testing.

I think ftruncate() probably needs a configure test.  I haven't done
this yet.

pindex(HIST_FCNTL_LOCK)
item(tt(HIST_FCNTL_LOCK))(
When writing out the history file, by default zsh uses ad-hoc file locking
to avoid known problems with locking on some operating systems.  With this
option locking is done by means of the system's tt(fcntl) call, where
this method is available.  On recent operating systems this may
provide better performance, in particular avoiding history corruption when
files are stored on NFS.
)

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



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