HEX
Server: LiteSpeed
System: Linux 112.webhostingindonesia.co.id 5.14.0-570.62.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 10:10:59 EST 2025 x86_64
User: iyfwylsv (10313)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: //lib/python3.9/site-packages/fail2ban/server/__pycache__/jailthread.cpython-39.opt-2.pyc
a

H��q	B���@sndZdZdZddlZddlmZddlmZddlm	Z	d	d
l
mZmZGdd�de�Z
ee
d
�sje
je
_dS)z
Cyril Jaquierz Copyright (c) 2004 Cyril JaquierZGPL�N)�Thread)�abstractmethod�)�Utils�)�
excepthook�prctl_set_th_namecsteZdZdZd�fdd�	Z�fdd�Zeddd	��Z�fd
d�Zedd
��Z	dd�Z
edd��Z�fdd�Z�Z
S)�
JailThreadaAbstract class for threading elements in Fail2Ban.

	Attributes
	----------
	daemon
	ident
	name
	status
	active : bool
		Control the state of the thread.
	idle : bool
		Control the idle state of the thread.
	sleeptime : int
		The time the thread sleeps for in the loop.
	NcsJtt��j|d�d�_d�_d�_tj�_�j	���fdd�}|�_	dS)N)�nameTFc
sbz�|i|�����WnBty\}z*tdur@tt���nt|�WYd}~n
d}~00dS�N)�onStop�	Exception�sysr�exc_info�print)�args�kwargs�e��run�self��>/usr/lib/python3.9/site-packages/fail2ban/server/jailthread.py�run_with_except_hookCsz1JailThread.__init__.<locals>.run_with_except_hook)
�superr	�__init__�daemon�activeZidlerZDEFAULT_SLEEP_TIMEZ	sleeptimer)rr
r��	__class__rrr4szJailThread.__init__cst|j�tt|���Sr)rr
rr	�
_bootstrap�rrrrr Qs
zJailThread._bootstrap�basiccCsdS)z0Abstract - Should provide status information.
		Nr)rZflavorrrr�statusUszJailThread.statuscsd|_tt|���dS)z&Sets active flag and starts thread.
		TN)rrr	�startr!rrrr$[szJailThread.startcCsdS)z2Abstract - Called when thread ends (after run).
		Nrr!rrrraszJailThread.onStopcCs
d|_dS)zASets `active` property to False, to flag run method to return.
		FN)rr!rrr�stopgszJailThread.stopcCsdS)zCAbstract - Called when thread starts, thread stops when returns.
		Nrr!rrrrlszJailThread.runcs|jdurtt|���dS)z` Safer join, that could be called also for not started (or ended) threads (used for cleanup).
		N)rrr	�joinr!rrrr&rs
zJailThread.join)N)r")�__name__�
__module__�__qualname__�__doc__rr rr#r$rr%rr&�
__classcell__rrrrr	#s

r	�isAlive)�
__author__Z
__copyright__Z__license__r�	threadingr�abcrZutilsrZhelpersrrr	�hasattr�is_aliver,rrrr�<module>sY