python-simpleflock icon indicating copy to clipboard operation
python-simpleflock copied to clipboard

Stale file handles when used on a NFS mount

Open simonmarwitz opened this issue 5 years ago • 0 comments

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.

simonmarwitz avatar Oct 12 '20 07:10 simonmarwitz