Fix locking issues in Windows
The Windows Storage Cinder plugin through the Windows Locks implementation of the InterProcessLock fails in attaching/detaching operations. Change-Id: I682205592e152b3222e04ca3221d25594d134dd9 Fixes: bug #1153966
This commit is contained in:
parent
279bdf43aa
commit
3015e31078
@ -107,10 +107,10 @@ class _InterProcessLock(object):
|
||||
|
||||
class _WindowsLock(_InterProcessLock):
|
||||
def trylock(self):
|
||||
msvcrt.locking(self.lockfile, msvcrt.LK_NBLCK, 1)
|
||||
msvcrt.locking(self.lockfile.fileno(), msvcrt.LK_NBLCK, 1)
|
||||
|
||||
def unlock(self):
|
||||
msvcrt.locking(self.lockfile, msvcrt.LK_UNLCK, 1)
|
||||
msvcrt.locking(self.lockfile.fileno(), msvcrt.LK_UNLCK, 1)
|
||||
|
||||
|
||||
class _PosixLock(_InterProcessLock):
|
||||
|
Loading…
Reference in New Issue
Block a user