NFS safe file locking [was: GNOME registry]



Quoting Miguel de Icaza <miguel@nuclecu.unam.mx>:
> 
> > What is the Unix-preferred method of file sharing?  I don't have my APUE
> > handy.  :)  And is it universal enough to not need a configure-time
> > check?
> 
> It is not going to be simple.  
> 
> The only way that will work reliably over NFS is using mkdir to create
> a temporary file.  On top of that, picture crashing problems, so you
> need to add timeout code to remove the directory if it fails and hope
> the failure was real.
> 
> Miguel.
> 

Check out liblockfile.  It provides NFS-safe file locking, and is free
software.  


ftp://ftp.debian.org/debian/dists/unstable/main/source/libs/liblockfile_0.1-6.tar.gz

No need to re-invent the wheel on this one...

 -Erik

--
Erik B. Andersen   Web:    http://www.inconnect.com/~andersen/ 
                   email:  andersee@debian.org
--This message was written using 73% post-consumer electrons--



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]