HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //lib/python3.6/site-packages/fail2ban/server/__pycache__/jailthread.cpython-36.pyc
3

UB(d��@s�dZdZdZddlZddlmZddlmZddlm	Z	d	d
l
mZmZGdd�de�Z
ejdkrle
je
_nee
d�s~e
je
_dS)z
Cyril Jaquierz Copyright (c) 2004 Cyril JaquierZGPL�N)�Thread)�abstractmethod�)�Utils�)�
excepthook�prctl_set_th_namecs�eZdZdZd�fdd�	Zejdkr2�fdd�Zndd	�Ze	ddd��Z
�fd
d�Ze	dd��Zdd�Z
e	dd��Z�fdd�Z�ZS)�
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)�nameTFcs\y�||��j�Wn@tk
rV}z$tdk	r>ttj��nt|�WYdd}~XnXdS)N)�onStop�	Exception�sysr�exc_info�print)�args�kwargs�e)�run�self�� /usr/lib/python3.6/jailthread.py�run_with_except_hookCs
z1JailThread.__init__.<locals>.run_with_except_hook)
�superr	�__init__Zdaemon�activeZidlerZDEFAULT_SLEEP_TIMEZ	sleeptimer)rr
r)�	__class__)rrrr4szJailThread.__init__�cst|j�tt|�j�S)N)rr
rr	�
_bootstrap)r)rrrrRs
zJailThread._bootstrapcCst|j�tj|�S)N)rr
r�_Thread__bootstrap)rrrrZ__bootstrapVs
zJailThread.__bootstrap�basiccCsdS)z0Abstract - Should provide status information.
		Nr)rZflavorrrr�statusZszJailThread.statuscsd|_tt|�j�dS)z&Sets active flag and starts thread.
		TN)rrr	�start)r)rrrr!`szJailThread.startcCsdS)z2Abstract - Called when thread ends (after run).
		Nr)rrrrrfszJailThread.onStopcCs
d|_dS)zASets `active` property to False, to flag run method to return.
		FN)r)rrrr�stoplszJailThread.stopcCsdS)zCAbstract - Called when thread starts, thread stops when returns.
		Nr)rrrrrqszJailThread.runcs|jdk	rtt|�j�dS)z` Safer join, that could be called also for not started (or ended) threads (used for cleanup).
		N)rrr	�join)r)rrrr#ws
zJailThread.join)N)r)r)�__name__�
__module__�__qualname__�__doc__rr
�version_infor�_JailThread__bootstraprr r!rr"rr#�
__classcell__rr)rrr	#s
r	r�isAlive)r)�
__author__Z
__copyright__Z__license__r
Z	threadingr�abcrZutilsrZhelpersrrr	r(r)r�hasattrZis_aliver+rrrr�<module>s^