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:
Pedro Navarro Perez 2013-03-12 04:24:51 -07:00
parent 279bdf43aa
commit 3015e31078
1 changed files with 2 additions and 2 deletions

View File

@ -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):