parameters: (self, lockfile, *cmd_list)
return_statement: return subprocess.call(cmd_list)
docstring: Emulates the most basic behavior of Linux's flock(1).
docstring_summary: Emulates the most basic behavior of Linux's flock(1).
docstring_tokens: Emulates the most basic behavior of Linux s flock ( 1 ) .
function: def ExecFlock(self, lockfile, *cmd_list):
      """Emulates the most basic behavior of Linux's flock(1)."""
      # Rely on exception handling to report errors.
      fd = os.open(lockfile, os.O_RDONLY|os.O_NOCTTY|os.O_CREAT, 0o666)
      fcntl.flock(fd, fcntl.LOCK_EX)
      return subprocess.call(cmd_list)
function_tokens: def ExecFlock ( self , lockfile , * cmd_list ) : # Rely on exception handling to report errors. fd = os . open ( lockfile , os . O_RDONLY | os . O_NOCTTY | os . O_CREAT , 0o666 ) fcntl . flock ( fd , fcntl . LOCK_EX ) return subprocess . call ( cmd_list )