Yohohohohohooho | Sanrei Aya
Sanrei Aya


Server : LiteSpeed
System : Linux barito.iixcp.rumahweb.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : elvh3918 ( 1528)
PHP Version : 8.2.31
Disable Function : mail
Directory :  /usr/local/lib/python3.9/site-packages/billiard/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/local/lib/python3.9/site-packages/billiard/__pycache__/_win.cpython-39.pyc
a

��Shg�@s�dZddlZddlmZmZmZmZmZmZm	Z	m
Z
mZddlm
Z
mZdZed�jZGdd�de�Zee�Zdd
d�Zddd
�Zddd�Zddd�Zdd�Zddd�Zdd�ZdS)zZ
    billiard._win
    ~~~~~~~~~~~~~

    Windows utilities to terminate process groups.

�N)	�byref�sizeof�windll�	Structure�WinError�POINTER�c_size_t�c_char�c_void_p)�DWORD�LONG����c@sPeZdZdefdefdefdefdefdefdefdefd	efd
edfg
ZdS)
�PROCESSENTRY32�dwSizeZcntUsage�
th32ProcessIDZth32DefaultHeapIDZth32ModuleIDZ
cntThreads�th32ParentProcessIDZpcPriClassBase�dwFlagsZ	szExeFileiN)�__name__�
__module__�__qualname__rrrr	�_fields_�rr�7/usr/local/lib/python3.9/site-packages/billiard/_win.pyrs
�r�cCs tj�||�}|tkrt��|S�N)r�kernel32�CreateToolhelp32Snapshot�INVALID_HANDLE_VALUEr)rr�	hSnapshotrrrr+s�rcCsttjj||�Sr)�_Process32nrr�Process32First�r�perrrr!3sr!cCsttjj||�Sr)r rr�
Process32Nextr"rrrr$7sr$cCsF|durt�}tt�|_||t|��}|sBtj��tkr<dSt��|Sr)	rrrrrrZGetLastError�ERROR_NO_MORE_FILESr)Zfunrr#�successrrrr ;s
r cCs8t�}i}t|�}|r4|jr(|j||j<t||�}q|S)z}Return a dictionary with all processes pids as keys and their
       parents as value. Ignore processes with no parents.
    )rr!rrr$)�h�parentsr#rrr�get_all_processes_pidsGsr)TcCsjt�}t|���}|h}|��}|D]}|||vr$|�|�q$||krJqT|��}q|sb|�|�t|�S)z1Return a list with all the pids of a process tree)r)�list�keys�copy�add�remove)�pidZinclude_parentr(Zall_pidsZpidsZpids_new�_pidrrr�get_processtree_pidsVs

r1cCs"t|�}|D]}t�||�qdS)z&Kill a process and all its descendantsN)r1�os�kill)r/�signumZfamily_pidsr0rrr�kill_processtreemsr5)rr)N)N)N)T)�__doc__r2�ctypesrrrrrrrr	r
Zctypes.wintypesrrr%�valuerrZLPPROCESSENTRY32rr!r$r r)r1r5rrrr�<module>s,








Yohohohohohooho | Sanrei Aya