HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/zc/lockfile/__pycache__/__init__.cpython-310.pyc
o

�N�gN�@s�ddlZddlZddlZe�d�ZGdd�de�ZzddlZWn)eyHzddl	Z	Wney=dd�Z
dd�ZYn	wd	d�Z
d
d�ZYnwejej
BZdd�Z
dd�ZGd
d�de�ZGdd�d�ZdS)�Nzzc.lockfilec@seZdZdZdS)�	LockErrorzCouldn't get a lock
    N)�__name__�
__module__�__qualname__�__doc__�rr�H/opt/saltstack/salt/lib/python3.10/site-packages/zc/lockfile/__init__.pyrsrcC�td���Nz(No file-locking support on this platform��	TypeError��filerrr�
_lock_file�rcCr	r
rr
rrr�_unlock_file rrcCs8z
t�|��tjd�WdStytd|j��w)N��Couldn't lock %r)�msvcrt�locking�filenoZLK_NBLCK�IOErrorr�namer
rrrr%s
�cCsBz|�d�t�|��tjd�WdSty td|j��w)NrrzCouldn't unlock %r)�seekrrrZLK_UNLCKrrrr
rrrr,s
�cCs4zt�|��t�WdStytd|j��w)Nr)�fcntl�flockr�_flagsrrrr
rrrr7s
�cCst�|��tj�dS�N)rrr�LOCK_UNr
rrrr=sc@seZdZdZdd�ZdS)�LazyHostNamez>Avoid importing socket and calling gethostname() unnecessarilycCsddl}|��S)Nr)�socket�gethostname)�selfr rrr�__str__BszLazyHostName.__str__N)rrrrr#rrrrr@src@s"eZdZdZddd�Zdd�ZdS)�LockFileN�{pid}cCs�||_zt|d�}Wntyt|d�}Ynwzt|�Wn|���||_|�d|jt�	�t
�d��|��|��dS)Nzr+za+z %s
)�pid�hostname)
�_path�openrr�close�_fp�write�format�os�getpidr�truncate�flush)r"�pathZcontent_template�fprrr�__init__Ks"�
�zLockFile.__init__cCs,|jdurt|j�|j��d|_dSdSr)r+rr*)r"rrrr*ds




�zLockFile.close)r%)rrrr+r4r*rrrrr$Gs
r$)r.�errno�logging�	getLogger�logger�	Exceptionrr�ImportErrorrrr�LOCK_EX�LOCK_NBr�objectrr$rrrr�<module>s.
���