Your IP : 3.135.209.20
a
R�fs
� @ s. d Z ddlZG dd� d�Zdd� Zdd� ZdS ) z�
Basic subprocess implementation for POSIX which only uses os functions. Only
implement features required by setup.py to build C extension modules when
subprocess is unavailable. setup.py is not used on Windows.
� Nc @ s e Zd Zddd�Zdd� ZdS )�PopenNc C s || _ || _d | _d S )N)�_cmd�_env�
returncode)�self�cmd�env� r �4/opt/alt/python39/lib64/python3.9/_bootsubprocess.py�__init__ s zPopen.__init__c C s� t �� }|dkrfzF| jd ur6t �| jd | j| j� nt �| jd | j� W t �d� q�t �d� 0 nt �|d�\}}t �|�| _ | j S )Nr � )
�os�forkr �execver �execv�_exit�waitpid�waitstatus_to_exitcoder )r �pid�_�statusr r r
�wait s
z
Popen.wait)N)�__name__�
__module__�__qualname__r r r r r r
r s
r c C s� g }dD ]2\}}t t|�t|�d �D ]}|�t|�� q&q|�d� d�|�}t| ttf�rd| }nt| t�rv| g}ndS |D ]8}t|t�s� dS |s� dS |D ]}||vr� dS q�q~dS )N))�a�z)�A�Z)�0�9r z./-� FT) �range�ord�append�chr�join�
isinstance�tuple�list�str)r Z
safe_chars�firstZlastZchZ
check_strs�argr r r
�
_check_cmd$ s(
r- c K s |rt t|���t| �s&td| ����d}t| t�s>d�| �} | � d|� �} z�t�| �}t� |�}|rztd| �d|����z6t
|d��}|�� }W d � n1 s�0 Y W n ty� d}Y n0 W zt�
|� W n ty� Y n0 n&zt�
|� W n t�y Y n0 0 |S ) Nzunsupported command: zcheck_output.tmp� z >zCommand z returned non-zero exit status �rb� )�NotImplementedError�reprr- �
ValueErrorr'