%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib64/python2.7/multiprocessing/
Upload File :
Create Path :
Current File : //lib64/python2.7/multiprocessing/forking.pyc

�
{fc@sddlZddlZddlZddlZddlmZmZddddddgZd	�Zdd
l	m
Z
de
fd��YZd�Zej
eej�e�d
�Zej
eej�e�ej
eej�e�yddlmZWnek
rn#Xd�Zd�Zej
ee�ejdkr�ddlZejZejZej Z de!fd��YZ"n}ddl#Z#ddl$Z$ddl%Z%ddlZddl&m'Z'm(Z(m)Z)ddlm*Z*ddl	m+Z+m,Z,dd�Z.dZ/ejdko%e0ede1�Z2ej3j4�j5d�Z6e'j7Ze'j8Z e6rsej9j:ej;d�a<n	ej3a<d�Z=de1d�Zde!fd��YZ"d�Z>d �Z?d!�Z@d"�ZAd#�ZBd$�ZCej
e(eC�ej
e)eC�gZDd%�ZEdS(&i����N(tutiltprocesstPopentassert_spawningtexitt	duplicatetclosetForkingPicklercCs,tj�s(tdt|�j��ndS(NsF%s objects should only be shared between processes through inheritance(Rtthread_is_spawningtRuntimeErrorttypet__name__(tself((s//usr/lib64/python2.7/multiprocessing/forking.pyR0s(tPicklercBs&eZejj�Zed��ZRS(cs �fd�}||j|<dS(Ncs#�|�}|jd||�dS(Ntobj(tsave_reduce(RRtrv(treduce(s//usr/lib64/python2.7/multiprocessing/forking.pyt
dispatcherAs(tdispatch(tclsR
RR((Rs//usr/lib64/python2.7/multiprocessing/forking.pytregister?s(Rt
__module__R
RtcopytclassmethodR(((s//usr/lib64/python2.7/multiprocessing/forking.pyR<scCsE|jdkr(t|j|jjffSt|j|jjffSdS(N(tim_selftNonetgetattrtim_classtim_funct	func_name(tm((s//usr/lib64/python2.7/multiprocessing/forking.pyt_reduce_methodFscCst|j|jffS(N(Rt__objclass__R(R((s//usr/lib64/python2.7/multiprocessing/forking.pyt_reduce_method_descriptorMs(tpartialcCs"t|j|j|jpiffS(N(t_rebuild_partialtfunctargstkeywords(tp((s//usr/lib64/python2.7/multiprocessing/forking.pyt_reduce_partial\scCst|||�S(N(R#(R%R&R'((s//usr/lib64/python2.7/multiprocessing/forking.pyR$^stwin32cBsDeZd�Zejd�Zdd�Zd�Ze	d��Z
RS(cCs�tjj�tjj�d|_tj�|_|jdkr�dtj	kriddl
}|j�n|j�}tjj�tjj�tj
|�ndS(Nitrandomi����(tsyststdouttflushtstderrRt
returncodetostforktpidtmodulesR+tseedt
_bootstrapt_exit(Rtprocess_objR+tcode((s//usr/lib64/python2.7/multiprocessing/forking.pyt__init__ts

	


cCs�|jdkr�x\trmytj|j|�\}}Wn/tjk
rh}|jtjkrdqndSXPqW||jkr�tj	|�r�tj
|�|_q�tj|�s�t�tj
|�|_q�n|jS(N(R0RtTrueR1twaitpidR3terrorterrnotEINTRtWIFSIGNALEDtWTERMSIGt	WIFEXITEDtAssertionErrortWEXITSTATUS(RtflagR3tstste((s//usr/lib64/python2.7/multiprocessing/forking.pytpoll�s	cCs�|dkr|jd�Stj�|}d}xc|j�}|dk	rNPn|tj�}|dkrnPnt|d|d�}tj|�q2W|S(Nig����Mb@?ig�������?(RRHttimetmintsleep(Rttimeouttdeadlinetdelaytrest	remaining((s//usr/lib64/python2.7/multiprocessing/forking.pytwait�s
cCsd|jdkr`ytj|jtj�Wq`tk
r\}|jdd�dkr]�q]q`XndS(NRLg�������?(	R0RR1tkillR3tsignaltSIGTERMtOSErrorRQ(RRG((s//usr/lib64/python2.7/multiprocessing/forking.pyt	terminate�scCstS(N(tFalse(((s//usr/lib64/python2.7/multiprocessing/forking.pyR�sN(RRR:R1tWNOHANGRHRRQRVtstaticmethodR(((s//usr/lib64/python2.7/multiprocessing/forking.pyRrs
		(R*t
ConnectiontPipeConnectioni(tFinalize(tloadtHIGHEST_PROTOCOLcCst||�j|�dS(N(Rtdump(Rtfiletprotocol((s//usr/lib64/python2.7/multiprocessing/forking.pyR_�sitfrozenspythonservice.exes
python.execCs
|adS(N(t_python_exe(texe((s//usr/lib64/python2.7/multiprocessing/forking.pytset_executable�scCsF|dkrtj�}ntjtj�||d|tj�j�S(Ni(Rt_subprocesstGetCurrentProcesstDuplicateHandletDUPLICATE_SAME_ACCESStDetach(thandlettarget_processtinheritable((s//usr/lib64/python2.7/multiprocessing/forking.pyR�s
cBs_eZdZej�Zd�Zed��Zed��Z	dd�Zd�Zd�Z
RS(sH
        Start a subprocess to run the code of a process object
        c
Cs7tj�\}}ttj|�dt�}tj|�t�|g}djd�|D��}t	j
t|ddddddd�	\}}}}	|j
�t|�||_d|_||_t|j�}
tj|d�}t|�tj_z$t|
|t�t||t�Wdtj`|j�XdS(NRmt css|]}d|VqdS(s"%s"N((t.0tx((s//usr/lib64/python2.7/multiprocessing/forking.pys	<genexpr>siitwb(R1tpipeRtmsvcrtt
get_osfhandleR;Rtget_command_linetjoinRft
CreateProcessRcRtCloseR3R0t_handletget_preparation_datat_nametfdopentintRt_tlstprocess_handleR_R^(RR8trfdtwfdtrhandletcmdthpthtR3ttidt	prep_datatto_child((s//usr/lib64/python2.7/multiprocessing/forking.pyR:�s(
-

				cCsttjdd�dk	S(NR(RRR~R(((s//usr/lib64/python2.7/multiprocessing/forking.pyRscCst|tjj�S(N(RRR~R(Rk((s//usr/lib64/python2.7/multiprocessing/forking.pytduplicate_for_childscCs�|jdkr�|dkr'tj}ntdt|dd��}tjt|j�|�}|tjkr�tj	|j�}|t
kr�tj}n||_q�n|jS(Nii�g�?(
R0RRftINFINITEtmaxR}tWaitForSingleObjectRyt
WAIT_OBJECT_0tGetExitCodeProcesst	TERMINATERSRT(RRLtmsecsROR9((s//usr/lib64/python2.7/multiprocessing/forking.pyRQ"s
cCs|jdd�S(NRLi(RQ(R((s//usr/lib64/python2.7/multiprocessing/forking.pyRH2scCse|jdkraytjt|j�t�Wqatk
r]|jdd�dkr^�q^qaXndS(NRLg�������?(	R0RRftTerminateProcessR}RyR�tWindowsErrorRQ(R((s//usr/lib64/python2.7/multiprocessing/forking.pyRV5s
N(RRt__doc__tthreadt_localR~R:RYRR�RRQRHRV(((s//usr/lib64/python2.7/multiprocessing/forking.pyR�s	!	cCsFt|�dkr>|ddkr>t|�dks:t�tStSdS(sE
        Return whether commandline indicates we are forking
        iis--multiprocessing-forkiN(tlenRCR;RW(targv((s//usr/lib64/python2.7/multiprocessing/forking.pyt
is_forkingAs"cCs'ttj�r#t�tj�ndS(sM
        Run code for process object if this in not the main process
        N(R�R,R�tmainR(((s//usr/lib64/python2.7/multiprocessing/forking.pytfreeze_supportLscCstttj�dt�r'td��nttdt�rFtjdgSd}tj�}t	g|d|dgSdS(sR
        Returns prefix of command line used for spawning a child process
        t_inheritings�
            Attempt to start a new process before the current process
            has finished its bootstrapping phase.

            This probably means that you are on Windows and you have
            forgotten to use the proper idiom in the main module:

                if __name__ == '__main__':
                    freeze_support()
                    ...

            The "freeze_support()" line can be omitted if the program
            is not going to be frozen to produce a Windows executable.Rbs--multiprocessing-forks0from multiprocessing.forking import main; main()s-cN(
RRtcurrent_processRWR	R,t
executableRt_args_from_interpreter_flagsRc(tprogtopts((s//usr/lib64/python2.7/multiprocessing/forking.pyRuUs
cCs�ttj�st�ttjd�}tj|tj�}tj	|d�}t
tj�_
t|�}t|�t|�}ttj�_
|j�|j�}t|�dS(s?
        Run code specified by data received over pipe
        i����trbN(R�R,R�RCR}Rstopen_osfhandleR1tO_RDONLYR|R;RR�R�R]tprepareRWRR6R(Rktfdtfrom_parenttpreparation_dataRtexitcode((s//usr/lib64/python2.7/multiprocessing/forking.pyR�ps

c
CsLddlm}m}td|dtjdtjd|dtjdtj	�j
�}|dk	rt|j�|d	<nt
rHtrH|dd
j�jd�rHttjdd
d�}|r�tjd
dkr�tjd
}n|dk	rHtjj|�r,tjdk	r,tjjtj|�}ntjj|�|d<qHn|S(sU
        Return info about parent needed by child to unpickle process object
        i(t_loggert_log_to_stderrtnametsys_pathtsys_argvt
log_to_stderrtorig_dirtauthkeyt	log_levelispythonservice.exet__main__t__file__ts-ct	main_pathN(R�s-c(RR�R�tdictR,tpathR�RtORIGINAL_DIRR�R�RtgetEffectiveLeveltWINEXEt
WINSERVICEtlowertendswithRR4R1tisabsRvtnormpath(R�R�R�tdR�((s//usr/lib64/python2.7/multiprocessing/forking.pyRz�s*			cCsVtj�s(tdt|�j��nt|�tj|j��|j|jffS(NsLBy default %s objects can only be shared between processes
using inheritance(	RRR	R
RR�tfilenotreadabletwritable(tconn((s//usr/lib64/python2.7/multiprocessing/forking.pytreduce_connection�sc
Cs�tjtjd�d|kr6|dtj�_nd|krX|dtj�_nd|kr{|dr{tj	�nd|kr�tj
�j|d�nd|kr�|dt_nd|kr�|dt_
nd|kr�tj|d�nd	|kr|d	t_nd
|kr�|d
}tjjtjj|��d}|dkrztjjtjj|��}n|dkr�tjd}||_q�|d
kr�ddl}|dkr�d}nTtjj|�jd�rtjjtjj|��g}ntjj|�g}|tjks;t|��|j||�\}}}z|jd|||�}Wd|r�|j�nX|tjd<d|_xM|jj�D]9}	y|	jdkr�d|	_nWq�t k
r�q�Xq�Wq�ndS(sE
    Try to get current process ready to unpickle process object
    R�R�R�R�R�R�R�tdirR�R�iR:tipythoni����Ns__init__.pyt__parents_main__(!told_main_modulestappendR,R4RR�R�t_authkeyRR�t
get_loggertsetLevelR�R�R1tchdirR�tsplitexttbasenametdirnameR�timpRt
startswithRCtfind_moduletload_moduleRRt__dict__tvaluesRt	Exception(
tdataR�t	main_nametmain_moduleR�tdirsR`t	path_nametetcR((s//usr/lib64/python2.7/multiprocessing/forking.pyR��s^

"!
	$
	
(FR1R,RSR>tmultiprocessingRRt__all__RtpickleR
RR RR
tsaveR"tlistR�R}t__add__t	functoolsR#tImportErrorR)R$tplatformRIR7RtdupRRtobjectRR�RsRft_multiprocessingR*RZR[R\R]R^RR_R�RRWR�R�R�R�R�tExitProcesstCloseHandleR�Rvtexec_prefixRcReR�R�RuR�RzR�R�R�(((s//usr/lib64/python2.7/multiprocessing/forking.pyt<module>#sn	
		
					G!				
N						#		

Zerion Mini Shell 1.0