AlkantarClanX12
Current Path : /opt/alt/python35/lib64/python3.5/multiprocessing/__pycache__/ |
Current File : //opt/alt/python35/lib64/python3.5/multiprocessing/__pycache__/popen_spawn_posix.cpython-35.pyc |
��Yf{ � @ s� d d l Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d g Z Gd d � d e � Z Gd d � d e j � Z d S)� N� )�context)� popen_fork)� reduction)�spawn)�util�Popenc @ s( e Z d Z d d � Z d d � Z d S)�_DupFdc C s | | _ d S)N)�fd)�selfr � r �F/opt/alt/python35/lib64/python3.5/multiprocessing/popen_spawn_posix.py�__init__ s z_DupFd.__init__c C s | j S)N)r )r r r r �detach s z _DupFd.detachN)�__name__� __module__�__qualname__r r r r r r r s r c sF e Z d Z d Z e Z � f d d � Z d d � Z d d � Z � S)r r c s g | _ t � j | � d S)N)�_fds�superr )r �process_obj)� __class__r r r s zPopen.__init__c C s | j j | � | S)N)r �append)r r r r r �duplicate_for_child# s zPopen.duplicate_for_childc C s� d d l m } | j � } | j j | � t j | j � } t j � } t j | � z$ t j | | � t j | | � Wd t j d � Xd } } } } z� t j � \ } } t j � \ } } t j d | d | � } | j j | | g � t j t j � | | j � | _ | | _ t | d d d �� } | j | j � � Wd QRXWd | d k rxt j | t j | f � x0 | | | f D] } | d k r�t j | � q�WXd S)Nr )�semaphore_tracker� tracker_fdZpipe_handle�wb�closefdF)� r Zgetfdr r r Zget_preparation_data�_name�io�BytesIOr Zset_spawning_popenr �dump�os�pipeZget_command_line�extendr Zspawnv_passfdsZget_executable�pid�sentinel�open�write� getbufferZFinalize�close) r r r r Z prep_data�fpZparent_rZchild_wZchild_rZparent_w�cmd�fr r r r �_launch'