summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/gyp/pylib/gyp/flock_tool.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/gyp/pylib/gyp/flock_tool.py b/tools/gyp/pylib/gyp/flock_tool.py
index 3e7efff26..df8dfbfdd 100755
--- a/tools/gyp/pylib/gyp/flock_tool.py
+++ b/tools/gyp/pylib/gyp/flock_tool.py
@@ -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)