:
:Yup, byte range locking fcntl APIs are present but over NFS they don't work.
:
:So shouldn't one be able to get entire-file locking with the old-fashioned:
:
:  open("foo.lockfile", O_CREAT | O_EXCL, 0644)
:
:You would think so, but my experience is that reliably protects critical
:sections only when using NFS Version 3.  Not V2.  Read about EXCLUSIVE in
:the CREATE procedure in RFC 1813 for another level of detail.
:
:--
:Conrad Minshall ... [EMAIL PROTECTED] ... 408 974-2749
:Apple Computer ... Mac OS X Core Operating Systems ... NFS/UDF/etc

    open w/ O_CREAT|O_EXCL does work over NFS but, of course, suffers from
    the 'process died and never removed the file' problem.

    flock() and POSIX fctl locks work locally between processes on any
    given host, but will NOT work between hosts.

                                        -Matt
                                        Matthew Dillon 
                                        <[EMAIL PROTECTED]>


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to