$30 GRAYBYTE WORDPRESS FILE MANAGER $33

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.157
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/

HOME
Current File : /usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp//flock_tool.py
#! /usr/bin/python2
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""These functions are executed via gyp-flock-tool when using the Makefile
generator.  Used on systems that don't have a built-in flock."""

import fcntl
import os
import struct
import subprocess
import sys


def main(args):
  executor = FlockTool()
  executor.Dispatch(args)


class FlockTool(object):
  """This class emulates the 'flock' command."""
  def Dispatch(self, args):
    """Dispatches a string command to a method."""
    if len(args) < 1:
      raise Exception("Not enough arguments")

    method = "Exec%s" % self._CommandifyName(args[0])
    getattr(self, method)(*args[1:])

  def _CommandifyName(self, name_string):
    """Transforms a tool name like copy-info-plist to CopyInfoPlist"""
    return name_string.title().replace('-', '')

  def ExecFlock(self, lockfile, *cmd_list):
    """Emulates the most basic behavior of Linux's flock(1)."""
    # Rely on exception handling to report errors.
    # Note that the stock python on SunOS has a bug
    # where fcntl.flock(fd, LOCK_EX) always fails
    # 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, 0o666)
    if sys.platform.startswith('aix'):
      # Python on AIX is compiled with LARGEFILE support, which changes the
      # struct size.
      op = struct.pack('hhIllqq', fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
    else:
      op = struct.pack('hhllhhl', fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
    fcntl.fcntl(fd, fcntl.F_SETLK, op)
    return subprocess.call(cmd_list)


if __name__ == '__main__':
  sys.exit(main(sys.argv[1:]))


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
1 Jan 1970 12.00 AM
root / root
0
generator
--
3 Mar 2024 10.36 PM
root / root
0755
MSVSNew.py
11.656 KB
10 Mar 2021 2.36 PM
root / root
0644
MSVSProject.py
6.237 KB
10 Mar 2021 2.36 PM
root / root
0644
MSVSSettings.py
44.11 KB
10 Mar 2021 2.36 PM
root / root
0644
MSVSSettings_test.py
64.562 KB
10 Mar 2021 2.36 PM
root / root
0644
MSVSToolFile.py
1.762 KB
10 Mar 2021 2.36 PM
root / root
0644
MSVSUserFile.py
4.967 KB
10 Mar 2021 2.36 PM
root / root
0644
MSVSUtil.py
9.31 KB
10 Mar 2021 2.36 PM
root / root
0644
MSVSVersion.py
17.024 KB
10 Mar 2021 2.36 PM
root / root
0644
__init__.py
21.868 KB
10 Mar 2021 2.36 PM
root / root
0644
common.py
20.579 KB
10 Mar 2021 2.36 PM
root / root
0644
common_test.py
1.918 KB
10 Mar 2021 2.36 PM
root / root
0644
easy_xml.py
4.873 KB
10 Mar 2021 2.36 PM
root / root
0644
easy_xml_test.py
3.249 KB
10 Mar 2021 2.36 PM
root / root
0644
flock_tool.py
1.706 KB
10 Mar 2021 2.36 PM
root / root
0644
input.py
113.647 KB
10 Mar 2021 2.36 PM
root / root
0644
input_test.py
3.11 KB
10 Mar 2021 2.36 PM
root / root
0644
mac_tool.py
22.892 KB
10 Mar 2021 2.36 PM
root / root
0644
msvs_emulation.py
46.759 KB
10 Mar 2021 2.36 PM
root / root
0644
ninja_syntax.py
5.406 KB
10 Mar 2021 2.36 PM
root / root
0644
simple_copy.py
1.302 KB
10 Mar 2021 2.36 PM
root / root
0644
win_tool.py
12.723 KB
10 Mar 2021 2.36 PM
root / root
0644
xcode_emulation.py
64.854 KB
10 Mar 2021 2.36 PM
root / root
0644
xcode_ninja.py
10.32 KB
10 Mar 2021 2.36 PM
root / root
0644
xcodeproj_file.py
117.659 KB
10 Mar 2021 2.36 PM
root / root
0644
xml_fix.py
2.123 KB
10 Mar 2021 2.36 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF