python-simpleflock
python-simpleflock copied to clipboard
Race at exit
After fcntl.flock(self._fd, fcntl.LOCK_UN) another process may acquire a lock before os.unlink(self._path) deletes it, so a third process may acquire it while the second still holds it. The lock file should be deleted before it is released.