python-simpleflock
python-simpleflock copied to clipboard
Stale file handles when used on a NFS mount
When simpleflock is trying to acquire a lock on a NFS mount and that lock is held by another process, upon release of the lock, an OSError: [Errno 116] Stale file handle occurs. If fixed this in locally by changing line 24 to
if ex.errno not in (errno.EAGAIN, errno.ESTALE): # Resource temporarily unavailable, or stale file handle
and adding right below
if ex.errno == errno.ESTALE:
self._fd = os.open(self._path, os.O_CREAT)
I guess the solution in #7 would also fix this problem.