Make lockdata long enough on 32-bit with 64-bit file pointers.

Closes: #288
Approved by: cgwalters
This commit is contained in:
Timothy E Baldwin
2018-09-01 21:37:15 +01:00
committed by Atomic Bot
parent 591b9dd90f
commit 5739fa370f

View File

@@ -200,7 +200,7 @@ if sys.argv[2] == 'wait':
locktype = fcntl.F_SETLKW
else:
locktype = fcntl.F_SETLK
lockdata = struct.pack("hhllhh", fcntl.F_WRLCK, 0, 0, 0, 0, 0)
lockdata = struct.pack("hhqqhh", fcntl.F_WRLCK, 0, 0, 0, 0, 0)
fd=open(sys.argv[1], 'a')
try:
fcntl.fcntl(fd.fileno(), locktype, lockdata)