HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //usr/lib/python3.6/site-packages/gyp/__pycache__/flock_tool.cpython-36.opt-1.pyc
3

��S]��@shdZddlZddlZddlZddlZddlZdd�ZGdd�de�Ze	dkrdej
eejdd���dS)	z�These functions are executed via gyp-flock-tool when using the Makefile
generator.  Used on systems that don't have a built-in flock.�NcCst�}|j|�dS)N)�	FlockTool�Dispatch)�args�executor�r� /usr/lib/python3.6/flock_tool.py�mainsrc@s(eZdZdZdd�Zdd�Zdd�ZdS)	rz(This class emulates the 'flock' command.cCs@t|�dkrtd��d|j|d�}t||�|dd��dS)z(Dispatches a string command to a method.�zNot enough argumentszExec%srN)�len�	Exception�_CommandifyName�getattr)�selfr�methodrrrrszFlockTool.DispatchcCs|j�jdd�S)z<Transforms a tool name like copy-info-plist to CopyInfoPlist�-�)�title�replace)rZname_stringrrrrszFlockTool._CommandifyNamec	Gsxtj|tjtjBtjBd�}tjjd�rDtj	dt
jdddddd�}ntj	dt
jdddddd�}t
j
|t
j|�t
j|�S)z5Emulates the most basic behavior of Linux's flock(1).i��aixZhhIllqqrZhhllhhl)�os�open�O_WRONLY�O_NOCTTY�O_CREAT�sys�platform�
startswith�struct�pack�fcntlZF_WRLCKZF_SETLK�
subprocessZcall)rZlockfileZcmd_list�fd�oprrr�	ExecFlock"szFlockTool.ExecFlockN)�__name__�
__module__�__qualname__�__doc__rrr#rrrrrsr�__main__r	)r'rrrr rr�objectrr$�exit�argvrrrr�<module>s