Compare commits

...

1 Commits

Author SHA1 Message Date
Timothy J Fontaine
d0d4719e47 gyp: use fcntl.flock(fd, LOCK_EX)
It was changed to work around an old python and sunos bug, which
appears to have been solved now, maybe we can avoid the racey builds
now.
2014-01-26 09:28:49 -08:00

View File

@@ -40,8 +40,9 @@ class FlockTool(object):
# with EBADF, that's why we use this F_SETLK
# hack instead.
fd = os.open(lockfile, os.O_WRONLY|os.O_NOCTTY|os.O_CREAT, 0666)
op = struct.pack('hhllhhl', fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
fcntl.fcntl(fd, fcntl.F_SETLK, op)
#op = struct.pack('hhllhhl', fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
#fcntl.fcntl(fd, fcntl.F_SETLK, op)
fcntl.flock(fd, fcntl.LOCK_EX)
return subprocess.call(cmd_list)