HEX
Server: Apache
System: Linux insrv.serversdaddy.com 5.14.0-362.24.2.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Mar 30 14:11:54 EDT 2024 x86_64
User: jsaha (1066)
PHP: 8.3.6
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/clcommon/__pycache__/lock.cpython-37.pyc
B

z���g��@sFddlmZddlZddlZddlZdd�Zdd�Zejdd��ZdS)	�)�absolute_importNcCs|tj�|�}|dkr2tj�|�s2t�tj�|��t|d�}t�|tj�|�	dd�|�
�|�tt�
���|��|S)N�za+r)�os�path�dirname�exists�makedirs�open�fcntl�flockZLOCK_EX�seek�truncate�write�str�getpid�flush)�
lockfile_pathZ
lock_file_dir�fd�r��/builddir/build/BUILDROOT/alt-python27-cllib-3.4.1-1.el9.cloudlinux.x86_64/opt/alt/python37/lib/python3.7/site-packages/clcommon/lock.py�
setup_locks
rcCst�|��tj�|��dS)N)r
r�filenoZLOCK_UN�close)rrrr�release_lock srccst|�}dVt|�dS)zE
    Usage:
    with acquire_lock():
       ... do something ...
    N)rr)rrrrr�acquire_lock%sr)	Z
__future__r�
contextlibr
rrr�contextmanagerrrrrr�<module>s