Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh got stuck without any message because of history lock file
On Apr 25, 9:35am, Peter Stephenson wrote:
}
} It's hard to construct an argument where locking a single file with
} multiple different mechanisms is the right answer.
The argument goes something like this:
Consider a .zhistory on a shared filesystem (NFS or Samba). Mutliple
hosts access this file system. Some of the operating systems involved
support fcntl(), some do not.
In this situation the only correct thing is to use the .LOCK file, but
that might be expensive for some of the hosts that have fcntl(). Posit
that these are the busiest hosts, most likely to have lock contention.
In this circumstance it may be beneficial to "fail faster" by attempting
fcntl() [which blocks out all the other zsh that support it], then only
create the .LOCK file [to block out the rest] after fcntl() succeeds.
I don't claim this scenario is likely or that we have to account for it,
but prior to 32580 zsh *has* supported it.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author