AlkantarClanX12

Your IP : 18.119.28.213


Current Path : /opt/alt/python36/lib64/python3.6/multiprocessing/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/multiprocessing/__pycache__/reduction.cpython-36.opt-2.pyc

3

��2a
$�@sddlmZmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddddd	gZe	j
d
kp�eed�o�eed�o�eejd
�ZGdd�dej�ZejZd5dd	�Ze	j
d
k�redddg7ZddlZd6dd�Zdd�Zdd�Zdd�ZGdd�de�ZnHedddg7ZddlZe	j
dkZdd�Zdd�Zdd�Zd d�Zd!d�Zd"d#�Z Gd$d%�d%�Z!ee"e!�j#�e �d&d'�Z$ee"e%j&�e$�ee"e'j(�e$�d(d)�Z)d*d+�Z*eej+e)�e	j
d
k�r�d,d-�Z,d.d/�Z-eeje,�nd0d-�Z,d1d/�Z-eeje,�Gd2d3�d3ed4�Z.dS)7�)�ABCMeta�abstractmethodN�)�context�send_handle�recv_handle�ForkingPickler�register�dump�win32ZCMSG_LEN�
SCM_RIGHTS�sendmsgcsFeZdZiZejZ�fdd�Zedd��Z	eddd��Z
ejZ�Z
S)	rcs*t�j|�|jj�|_|jj|j�dS)N)�super�__init__�_copyreg_dispatch_table�copy�dispatch_table�update�_extra_reducers)�self�args)�	__class__��./opt/alt/python36/lib64/python3.6/reduction.pyr&szForkingPickler.__init__cCs||j|<dS)N)r)�cls�type�reducerrrr	+szForkingPickler.registerNcCs tj�}|||�j|�|j�S)N)�io�BytesIOr
�	getbuffer)r�obj�protocol�bufrrr�dumps0szForkingPickler.dumps)N)�__name__�
__module__�__qualname__r�copyregrrr�classmethodr	r#�pickle�loads�
__classcell__rr)rrr!scCst||�j|�dS)N)rr
)r �filer!rrrr
:s�	DupHandle�	duplicate�steal_handleFcCs*|dkrtj�}tjtj�||d|tj�S)Nr)�_winapi�GetCurrentProcess�DuplicateHandle�DUPLICATE_SAME_ACCESS)�handleZtarget_processZinheritablerrrr.Gs

cCsBtjtjd|�}z tj||tj�ddtjtjB�Stj|�XdS)NFr)r0�OpenProcess�PROCESS_DUP_HANDLEr2r1r3�DUPLICATE_CLOSE_SOURCE�CloseHandle)Z
source_pidr4Zsource_process_handlerrrr/Os
cCst|tj|�}|j|�dS)N)r-r0r3�send)�connr4�destination_pidZdhrrrr[scCs|j�j�S)N)�recv�detach)r:rrrr`sc@seZdZddd�Zdd�ZdS)r-Nc
Cs\|dkrtj�}tjtjd|�}ztjtj�|||dd�|_Wdtj|�X||_	||_
dS)NFr)�os�getpidr0r5r6r2r1�_handler8�_access�_pid)rr4�access�pid�procrrrrfszDupHandle.__init__c
CsV|jtj�kr|jStjtjd|j�}ztj||jtj�|j	dtj
�Stj|�XdS)NF)rBr>r?r@r0r5r6r2r1rAr7r8)rrErrrr=us
zDupHandle.detach)N)r$r%r&rr=rrrrr-ds
�DupFd�sendfds�recvfds�darwincCsVtjd|�}tt|�dg�}|j|gtjtj|fg�trR|jd�dkrRt	d��dS)N�i�r�Az%did not receive acknowledgement of fd)
�array�bytes�lenr
�socket�
SOL_SOCKETr�ACKNOWLEDGEr<�RuntimeError)�sockZfds�msgrrrrG�s
cCs�tjd�}|j|}|jdtj|��\}}}}|r>|r>t�yxtrN|jd�t|�dkrjt	dt|���|d\}}	}
|tj
kr�|	tjkr�t|
�|jdkr�t�|j
|
�t|�SWnttfk
r�YnXt	d��dS)NrJrrLzreceived %d items of ancdatarzInvalid data received)rM�itemsizeZrecvmsgrPZ
CMSG_SPACE�EOFErrorrRr9rOrSrQr�
ValueErrorZ	frombytes�list�
IndexError)rT�size�aZ
bytes_sizerUZancdata�flagsZaddrZ
cmsg_levelZ	cmsg_typeZ	cmsg_datarrrrH�s*





c
Cs2tj|j�tjtj��}t||g�WdQRXdS)N)rP�fromfd�fileno�AF_UNIX�SOCK_STREAMrG)r:r4r;�srrrr�sc
Cs0tj|j�tjtj��}t|d�dSQRXdS)Nrr)rPr^r_r`rarH)r:rbrrrr�scCsFtj�}|dk	r |j|j|��Str:ddlm}|j|�Std��dS)Nr)�resource_sharerz&SCM_RIGHTS appears not to be available)rZget_spawning_popenrFZduplicate_for_child�HAVE_SEND_HANDLE�rcrX)�fdZ	popen_objrcrrrrF�s
cCs2|jdkrt|j|jjffSt|j|jjffSdS)N)�__self__�getattrr�__func__r$)�mrrr�_reduce_method�s
rkc@seZdZdd�ZdS)�_CcCsdS)Nr)rrrr�f�sz_C.fN)r$r%r&rmrrrrrl�srlcCst|j|jffS)N)rh�__objclass__r$)rjrrr�_reduce_method_descriptor�srocCst|j|j|jpiffS)N)�_rebuild_partial�funcr�keywords)�prrr�_reduce_partial�srtcCstj|f|�|�S)N)�	functools�partial)rqrrrrrrrp�srpcCsddlm}t||�ffS)Nr)�	DupSocket)rcrw�_rebuild_socket)rbrwrrr�_reduce_socket�srycCs|j�S)N)r=)Zdsrrrrx�srxcCs"t|j��}t||j|j|jffS)N)rFr_rx�familyr�proto)rb�dfrrrry�scCs|j�}tj||||d�S)N)r_)r=rP)r|rzrr{rfrrrrx�sc@s`eZdZeZeZeZeZeZej	dkr4e
Z
eZeZne
Z
eZeZeZeZeZeZeZdd�ZdS)�AbstractReducerrcGsNttt�j�t�tttj�t�tttj	�t�tt
jt�tt
j
t�dS)N)r	rrlrmrkrY�appendro�int�__add__rurvrtrPry)rrrrrr
s
zAbstractReducer.__init__N)r$r%r&rr	r
rr�sys�platformr/r.r-rGrHrFrkrorpryrxrrrrrr}�s$
r})�	metaclass)N)NF)/�abcrrr'rurr>r)rPr�rer�__all__r��hasattrrdZPicklerrr	r
r0r.r/rr�objectr-rMrRrGrHrFrkrlrrmrorYr~rr�rtrprvryrxr}rrrr�<module>
sb




#