ÿØÿâ MSV FM

MSV FM

Path : /opt/alt/python27/lib64/python2.7/multiprocessing/
File Upload :
Current < : //opt/alt/python27/lib64/python2.7/multiprocessing/forking.pyo

�
�[
bc@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</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pyR0s(tPicklercBs&eZejj�Zed��ZRS(cs �fd�}||j|<dS(Ncs#�|�}|jd||�dS(Ntobj(tsave_reduce(RRtrv(treduce(s</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pyt
dispatcherAs(tdispatch(tclsR
RR((Rs</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pytregister?s(Rt
__module__R
RtcopytclassmethodR(((s</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pyR<scCsE|jdkr(t|j|jjffSt|j|jjffSdS(N(tim_selftNonetgetattrtim_classtim_funct	func_name(tm((s</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pyt_reduce_methodFscCst|j|jffS(N(Rt__objclass__R(R((s</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pyt_reduce_method_descriptorMs(tpartialcCs"t|j|j|jpiffS(N(t_rebuild_partialtfunctargstkeywords(tp((s</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pyt_reduce_partial\scCst|||�S(N(R#(R%R&R'((s</opt/alt/python27/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</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pyt__init__ts

	


cCs�|jdkr�x\trmytj|j|�\}}Wn/tjk
rh}|jtjkrdqndSXPqW||jkr�tj	|�r�tj
|�|_q�tj|�|_q�n|jS(N(R0RtTrueR1twaitpidR3terrorterrnotEINTRtWIFSIGNALEDtWTERMSIGtWEXITSTATUS(RtflagR3tstste((s</opt/alt/python27/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�������?(RRFttimetmintsleep(Rttimeouttdeadlinetdelaytrest	remaining((s</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pytwait�s
cCsd|jdkr`ytj|jtj�Wq`tk
r\}|jdd�dkr]�q]q`XndS(NRJg�������?(	R0RR1tkillR3tsignaltSIGTERMtOSErrorRO(RRE((s</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pyt	terminate�scCstS(N(tFalse(((s</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pyR�sN(RRR:R1tWNOHANGRFRRORTtstaticmethodR(((s</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pyRrs
		(R*t
ConnectiontPipeConnectioni(tFinalize(tloadtHIGHEST_PROTOCOLcCst||�j|�dS(N(Rtdump(Rtfiletprotocol((s</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pyR]�sitfrozenspythonservice.exes
python.execCs
|adS(N(t_python_exe(texe((s</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pytset_executable�scCsF|dkrtj�}ntjtj�||d|tj�j�S(Ni(Rt_subprocesstGetCurrentProcesstDuplicateHandletDUPLICATE_SAME_ACCESStDetach(thandlettarget_processtinheritable((s</opt/alt/python27/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(NRkt css|]}d|VqdS(s"%s"N((t.0tx((s</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pys	<genexpr>siitwb(R1tpipeRtmsvcrtt
get_osfhandleR;Rtget_command_linetjoinRdt
CreateProcessRaRtCloseR3R0t_handletget_preparation_datat_nametfdopentintRt_tlstprocess_handleR]R\(RR8trfdtwfdtrhandletcmdthpthtR3ttidt	prep_datatto_child((s</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pyR:�s(
-

				cCsttjdd�dk	S(NR}(RRR|R(((s</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pyRscCst|tjj�S(N(RRR|R}(Ri((s</opt/alt/python27/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�?(
R0RRdtINFINITEtmaxR{tWaitForSingleObjectRwt
WAIT_OBJECT_0tGetExitCodeProcesst	TERMINATERQRR(RRJtmsecsRMR9((s</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pyRO"s
cCs|jdd�S(NRJi(RO(R((s</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pyRF2scCse|jdkraytjt|j�t�Wqatk
r]|jdd�dkr^�q^qaXndS(NRJg�������?(	R0RRdtTerminateProcessR{RwR�tWindowsErrorRO(R((s</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pyRT5s
N(RRt__doc__tthreadt_localR|R:RWRR�RRORFRT(((s</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pyR�s	!	cCs.t|�dkr&|ddkr&tStSdS(sE
        Return whether commandline indicates we are forking
        iis--multiprocessing-forkN(tlenR;RU(targv((s</opt/alt/python27/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</opt/alt/python27/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.R`s--multiprocessing-forks0from multiprocessing.forking import main; main()s-cN(
RRtcurrent_processRUR	R,t
executableRt_args_from_interpreter_flagsRa(tprogtopts((s</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pyRsUs
cCs�ttjd�}tj|tj�}tj|d�}tt	j
�_t|�}t
|�t|�}tt	j
�_|j�|j�}t|�dS(s?
        Run code specified by data received over pipe
        i����trbN(R{R,R�Rqtopen_osfhandleR1tO_RDONLYRzR;RR�R�R[tprepareRURR6R(Ritfdtfrom_parenttpreparation_dataRtexitcode((s</opt/alt/python27/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
WINSERVICEtlowertendswithRR4R1tisabsRttnormpath(R�R�R�tdR�((s</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pyRx�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</opt/alt/python27/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}|j||�\}}}z|jd|||�}Wd|rm|j�nX|tjd<d|_xM|jj�D]9}	y|	jdkr�d|	_nWq�tk
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
startswithtfind_moduletload_moduleRRt__dict__tvaluesRt	Exception(
tdataR�t	main_nametmain_moduleR�tdirsR^t	path_nametetcR((s</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pyR��s\

"!
	$
	
(FR1R,RQR>tmultiprocessingRRt__all__RtpickleR
RR RR
tsaveR"tlistR�R{t__add__t	functoolsR#tImportErrorR)R$tplatformRGR7RtdupRRtobjectRR�RqRdt_multiprocessingR*RXRYRZR[R\RR]R�RRUR�R�R�R�R�tExitProcesstCloseHandleR�Rttexec_prefixRaRcR�R�RsR�RxR�R�R�(((s</opt/alt/python27/lib64/python2.7/multiprocessing/forking.pyt<module>#sn	
		
					G!				
N						#		
jlklyejr@51.89.254.255: ~ $