CasperSecurity

Current Path : /lib/python3/dist-packages/supervisor/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/supervisor/__pycache__/pidproxy.cpython-310.pyc

o

�X[_a�@sPdZddlZddlZddlZddlZGdd�d�Zdd�Zedkr&e�dSdS)z{ An executable which proxies for a subprocess; upon a signal, it sends that
signal to the process identified by a pidfile. �Nc@s@eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dS)�PidProxyNc	Csj|��z|d|dd�|_}tj�|d�|_||_WdSttfy4|�	�t
�d�YdSw)N��r)�
setsignals�pidfile�os�path�abspath�command�cmdargs�
ValueError�
IndexError�usage�sys�exit)�self�argsr�r�5/usr/lib/python3/dist-packages/supervisor/pidproxy.py�__init__
s�zPidProxy.__init__cCsZt�tj|j|j�|_	t�d�zt�dtj	�d}Wnt
y'd}Ynw|r,dSq)Nr����r)r�spawnv�P_NOWAITr
r�pid�time�sleep�waitpid�WNOHANG�OSError)rrrrr�gos
��zPidProxy.gocCstd�dS)Nz4pidproxy.py <pidfile name> <command> [<cmdarg1> ...])�print�rrrrr"szPidProxy.usagecCstt�tj|j�t�tj|j�t�tj|j�t�tj|j�t�tj|j�t�tj|j�t�tj|j	�dS�N)
�signal�SIGTERM�passtochild�SIGHUP�SIGINT�SIGUSR1�SIGUSR2�SIGQUIT�SIGCHLD�reapr"rrrr%szPidProxy.setsignalscCsdSr#r)r�sig�framerrrr-.sz
PidProxy.reapcCs�z t|jd��}t|�����}Wd�n1swYWn
td|j�YdSt�||�|tj	tj
tjfvrEt�
d�dSdS)N�rzCan't read child pidfile %s!r)�openr�int�read�stripr!r�killr$r%r(r+rr)rr.r/�frrrrr&2s���zPidProxy.passtochild)
�__name__�
__module__�__qualname__rrr rrr-r&rrrrrs
	rcCsttj�}|��dSr#)rr�argvr )�pprrr�main=s
r<�__main__)�__doc__rrr$rrr<r7rrrr�<module>s2
�
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY