Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Unable to read history on latest Cygwin
- X-seq: zsh-workers 27535
- From: "Peter A. Castro" <doctor@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Unable to read history on latest Cygwin
- Date: Fri, 18 Dec 2009 16:48:02 -0800 (PST)
- Cc: zsh-users@xxxxxxx
- In-reply-to: <733654e30912171119v16378e1el494468c1e0e4838e@xxxxxxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1260800369.32429.1350005931@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <733654e30912160754q5e505cabo4a2510b41bf1d892@xxxxxxxxxxxxxx> <Pine.LNX.4.64.0912162357250.19572@xxxxxxxxxxxxxxxxxxxx> <733654e30912171119v16378e1el494468c1e0e4838e@xxxxxxxxxxxxxx>
On Thu, 17 Dec 2009, Wayne Davison wrote:
[appologies for cross-posting to both lists. I wanted to ensure this
thread carried over to zsh-workers where PeterS. moved it to, if there
are future discussions.]
On Thu, Dec 17, 2009 at 12:04 AM, Peter A. Castro <doctor@xxxxxxxxxxxx>wrote:
Hmm...atomic in the sense that the open vectors through the symlink to the
real file?
No, atomic as in no two people can think they were successful in creating it
-- one must succeed, and everyone else must fail. A file created
*without*O_EXCL succeeds for everyone, but sadly, O_EXCL does not always work
correctly (e.g. older NFS don't always support it). Thus, what matters is if
the chosen idiom can safely be used as a single-success locking method or
not. For O_EXCL, cygwin just needs to have implemented that right. For
symlinks, it will depend on how the creating of the (symlink-emulating) file
is created in the cygwin code.
Ah, I understand. Cygwin relies on the underlying mechanisms available
from MS Windows file API. From reviewing Cygwin code, it appears it is
using the native support for exclusive file locking, so, I beleve that,
yes, it does what you want (ie: only one process can exclusively open a
file using O_EXCL).
Creating symlinks, however, may not be atomic. I'll have to check code
on that, but the symlink is really just an ordinary file. I'll have to
check weither it's created with exclusive locks or not.
..wayne..
--
Peter A. Castro <doctor@xxxxxxxxxxxx> or <Peter.Castro@xxxxxxxxxx>
"Cats are just autistic Dogs" -- Dr. Tony Attwood
Messages sorted by:
Reverse Date,
Date,
Thread,
Author