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

Re: [PATCH] history locking with fcntl



On Apr 17, 10:40am, Peter Stephenson wrote:
}
} pindex(HIST_FCNTL_LOCK)
} provide better performance, in particular avoiding history corruption when
} files are stored on NFS.

Really?  Traditionally fcntl() has been a lousy way to lock over NFS.
Procmail, for example, has acres of code to handle using secondary
files as semaphores precisely because nothing else was reliable over
NFS (more specifically, only creat() was guaranteed to be atomic and
lock daemons were flaky).

I guess my point is that while fcntl() may be good on recent OSs (or
recent versions of NFS, more likely) it's dangerous in an environment
where you don't know what the NFS server is using (no matter how recent
the local NFS client is).



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