[Python-Dev] Does Python need a file locking module (slightly higher level)?

Jon Ribbens jon+python-dev at unequivocal.co.uk
Tue Oct 23 02:11:39 CEST 2007


On Tue, Oct 23, 2007 at 12:29:35PM +1300, Greg Ewing wrote:
> skip at pobox.com wrote:
> > Does fcntl.flock work over NFS and SMB and on Windows?
> 
> I don't think file locking will ever work over NFS, since
> it's a stateless protocol by design, and locking would
> require maintaining state on the server.

You can do file locking over NFS, that's one of the reasons people
use fcntl. It uses an RPC side channel separate to the main NFS
protocol.


More information about the Python-Dev mailing list