HEX
Server: LiteSpeed
System: Linux us-phx-web1284.main-hosting.eu 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: u300739242 (300739242)
PHP: 8.2.30
Disabled: system, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/alt/python311/lib/python3.11/site-packages/shellingham/posix/__pycache__/proc.cpython-311.pyc
�

�;fc
���ddlZddlZddlZddlZddlmZdZdZejd��Z	d�Z
d�Zd	�Zd
�Z
Gd�de��Zdd�ZdS)�N�)�Process��z
\(.+\)|\S+c	���tj��}dD]Q}tj�tj�dt|��|����r|cS�Rt
d���)z�Detect /proc filesystem style.

    This checks the /proc/{pid} directory for possible formats. Returns one of
    the following as str:

    * `stat`: Linux-style, i.e. ``/proc/{pid}/stat``.
    * `status`: BSD-style, i.e. ``/proc/{pid}/status``.
    )�stat�status�/proczunsupported proc format)�os�getpid�path�exists�join�str�ProcFormatError)�pid�names  �I/opt/alt/python311/lib/python3.11/site-packages/shellingham/posix/proc.py�detect_procrsi��
�)�+�+�C�"����
�7�>�>�"�'�,�,�w��C���$�?�?�@�@�	��K�K�K�	�
�3�
4�
4�4�c�~�	tj��j���dvS#t$rYdSwxYw)N)�freebsd�netbsd�	dragonflyF)r�uname�sysname�lower�	Exception�rr�_use_bsd_stat_formatr #sJ����x�z�z�!�'�'�)�)�-O�O�O�������u�u����s�+.�
<�<c�d�tj�dt|��|��}t	j|dd���5}t�|�����}ddd��n#1swxYwYt��r
|tS|tS)Nr
�ascii�replace��encoding�errors)rr
rr�io�open�STAT_PATTERN�findall�readr �
BSD_STAT_PPID�LINUX_STAT_PPID)rrr
�f�partss     r�	_get_ppidr0*s���
�7�<�<���S���4�0�0�D�	����	�	:�	:�	:�/�a��$�$�Q�V�V�X�X�.�.��/�/�/�/�/�/�/�/�/�/�/����/�/�/�/����$��]�#�#���!�!s�-A?�?B�Bc�b�tj�dt|��d��}t	j��pd}t
j||d���5}t|�	���
d��dd���cddd��S#1swxYwYdS)Nr
�cmdlinezutf-8r#r$����)rr
rr�sys�getfilesystemencodingr'r(�tupler+�split)rr
r%r.s    r�_get_cmdliner94s���
�7�<�<���S���9�5�5�D��(�*�*�5�g�H�	�����	;�	;�	;�0�q�
�Q�V�V�X�X�^�^�D�)�)�#�2�#�.�/�/�0�0�0�0�0�0�0�0�0�0�0�0����0�0�0�0�0�0s�<B$�$B(�+B(c��eZdZdS)rN)�__name__�
__module__�__qualname__rrrrr?s�������Drr�
c�B��t����fd�}|||��S)z8Try to look up the process tree via the /proc interface.c3��K�t|��D]@}t|���}t|��}t|||���V�|dkrdS|}�AdS)N)�argsr�ppid�0)�ranger0r9r)r�	max_depth�_rBrA�	stat_names     �r�_iter_process_parentsz3iter_process_parents.<locals>._iter_process_parentsJsv������y�!�!�	�	�A��S�)�,�,�D���$�$�D��t��4�8�8�8�8�8�8��s�{�{�����C�C�
	�	r)r)rrErHrGs   @r�iter_process_parentsrICs:����
�
�I�
�����!� ��i�0�0�0r)r>)r'r�rer5�_corerr,r-�compiler)rr r0r9�EnvironmentErrorrrIrrr�<module>rNs���	�	�	�	�	�	�	�	�	�	�	�	�
�
�
�
�������
�
����r�z�-�(�(��
5�
5�
5� ���"�"�"�0�0�0�	�	�	�	�	�&�	�	�	�1�1�1�1�1�1r