link(2) and atomic file creation on NFS
James Youngman
jay@gnu.org
Wed Aug 29 14:11:00 GMT 2001
"Noel L Yap" <yap_noel@jpmorgan.com> writes:
> Would a mkdir do the trick?
>
> Noel
Ordinarily, yes. (As CVS does, of course).
However, SCCS itself (i.e. the venerable AT&T-as-was product) uses
lock _files_ of the form z.foo. I hesitate before using lock
directories instead, because interoperability is the only (!) priority
of CSSC; I cannot afford to asopt a strategy which may fail to
interoperate completely with SCCS itself.
> I have some existing code which uses link(2) to achieve atomic locking
> on Unix over NFS (since O_EXCL does not work over NFS). The
> application (a GPLed SCCS clone) now compiles under Cygwin, but one
> remaining problem is that the lockfile code uses link(2) to create a
> hard link to an open file.
[snip]
--
James Youngman
Manchester, UK. +44 161 226 7339
PGP (GPG) key ID for <jay@gnu.org> is 64A95EE5 (F1B83152).
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list