ok

Mini Shell

Direktori : /proc/self/root/usr/lib64/python3.6/multiprocessing/__pycache__/
Upload File :
Current File : //proc/self/root/usr/lib64/python3.6/multiprocessing/__pycache__/reduction.cpython-36.opt-2.pyc

3


 \
$�@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__��1/usr/lib64/python3.6/multiprocessing/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�protocolZbufrrr�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)r/�OpenProcess�PROCESS_DUP_HANDLEr1r0r2�DUPLICATE_CLOSE_SOURCE�CloseHandle)Z
source_pidr3Zsource_process_handlerrrr.Os
cCst|tj|�}|j|�dS)N)r,r/r2�send)�connr3�destination_pidZdhrrrr[scCs|j�j�S)N)�recv�detach)r9rrrr`sc@seZdZddd�Zdd�ZdS)r,Nc
Cs\|dkrtj�}tjtjd|�}ztjtj�|||dd�|_Wdtj|�X||_	||_
dS)NFr)�os�getpidr/r4r5r1r0�_handler7�_access�_pid)rr3�access�pid�procrrrrfszDupHandle.__init__c
CsV|jtj�kr|jStjtjd|j�}ztj||jtj�|j	dtj
�Stj|�XdS)NF)rAr=r>r?r/r4r5r1r0r@r6r7)rrDrrrr<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�msgrrrrF�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)NrIrrKzreceived %d items of ancdatarzInvalid data received)rL�itemsizeZrecvmsgrOZ
CMSG_SPACE�EOFErrorrQr8rNrRrPr�
ValueErrorZ	frombytes�list�
IndexError)rS�size�aZ
bytes_sizerTZancdata�flagsZaddrZ
cmsg_levelZ	cmsg_typeZ	cmsg_datarrrrG�s*





c
Cs2tj|j�tjtj��}t||g�WdQRXdS)N)rO�fromfd�fileno�AF_UNIX�SOCK_STREAMrF)r9r3r:�srrrr�sc
Cs0tj|j�tjtj��}t|d�dSQRXdS)Nrr)rOr]r^r_r`rG)r9rarrrr�scCsFtj�}|dk	r |j|j|��Str:ddlm}|j|�Std��dS)Nr)�resource_sharerz&SCM_RIGHTS appears not to be available)rZget_spawning_popenrEZduplicate_for_child�HAVE_SEND_HANDLE�rbrW)�fdZ	popen_objrbrrrrE�s
cCs2|jdkrt|j|jjffSt|j|jjffSdS)N)�__self__�getattrr�__func__r#)�mrrr�_reduce_method�s
rjc@seZdZdd�ZdS)�_CcCsdS)Nr)rrrr�f�sz_C.fN)r#r$r%rlrrrrrk�srkcCst|j|jffS)N)rg�__objclass__r#)rirrr�_reduce_method_descriptor�srncCst|j|j|jpiffS)N)�_rebuild_partial�funcr�keywords)�prrr�_reduce_partial�srscCstj|f|�|�S)N)�	functools�partial)rprrqrrrro�srocCsddlm}t||�ffS)Nr)�	DupSocket)rbrv�_rebuild_socket)rarvrrr�_reduce_socket�srxcCs|j�S)N)r<)Zdsrrrrw�srwcCs"t|j��}t||j|j|jffS)N)rEr^rw�familyr�proto)ra�dfrrrrx�scCs|j�}tj||||d�S)N)r^)r<rO)r{ryrrzrerrrrw�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	rrkrlrjrX�appendrn�int�__add__rtrursrOrx)rrrrrr
s
zAbstractReducer.__init__N)r#r$r%rr	r
rr�sys�platformr.r-r,rFrGrErjrnrorxrwrrrrrr|�s$
r|)�	metaclass)N)NF)/�abcrrr&rtrr=r(rOr�rdr�__all__r��hasattrrcZPicklerrr	r
r/r-r.rr�objectr,rLrQrFrGrErjrkrrlrnrXr}r~rrsrorurxrwr|rrrr�<module>
sb




#


Zerion Mini Shell 1.0