![]() Server : Apache/2.4.52 (Ubuntu) System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64 User : www-data ( 33) PHP Version : 8.1.2-1ubuntu2.21 Disable Function : NONE Directory : /lib/python3/dist-packages/landscape/lib/__pycache__/ |
o ���c� � @ s6 d dl Z d dlZd dlZG dd� de�Zddd�ZdS )� Nc @ s e Zd ZdZdS )� LockErrorz"Raised when unable to lock a file.N)�__name__� __module__�__qualname__�__doc__� r r �4/usr/lib/python3/dist-packages/landscape/lib/lock.pyr s r c s� t �| t j�� t�� tjd�}|tjO }t�� tj|� t�� } zt�� tj tj B � W n tyB |t�� | k r@td��Y nw nt� d� q!� fdd�}|S )Nr TzCouldn't obtain lockg�������?c s t �� t j� t�� � d S )N)�fcntl�flock�LOCK_UN�os�closer ��fdr r �unlock_path s zlock_path.<locals>.unlock_path)r �open�O_CREATr �F_GETFD� FD_CLOEXEC�F_SETFD�timer �LOCK_EX�LOCK_NB�IOErrorr �sleep)�path�timeout�flags�startedr r r r � lock_path s$ �� � r )r )r r r � Exceptionr r r r r r �<module> s