File "unix_events.cpython-35.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python35/lib64/python3.5/asyncio/__pycache__/unix_events.cpython-35.pyc
File size: 31.93 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit



Yf
@sdZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddl
mZddl
m
Z
ddl
mZddl
mZdd	l
mZdd
l
mZddl
mZddl
mZdd
l
mZddlmZddlmZdddddgZejdkrbedddZy
ejZWnek
rddZYnXGdddejZ e!edrddZ"nddl#Z#d dZ"Gd!d"d"ej$Z%Gd#d$d$ej&ej'Z(e!ed%r>ej)Z*nddl#Z#d&d'Z*Gd(d)d)ej+Z,Gd*ddZ-Gd+d,d,e-Z.Gd-dde.Z/Gd.dde.Z0Gd/d0d0ej1Z2e Z3e2Z4dS)1z2Selector event loop for Unix with signal handling.N)base_events)base_subprocess)compat)	constants)
coroutines)events)futures)selector_events)	selectors)
transports)	coroutine)loggerSelectorEventLoopAbstractChildWatcherSafeChildWatcherFastChildWatcherDefaultEventLoopPolicywin32z+Signals are not really supported on WindowscCsdS)zDummy signal handler.N)signumframerr8/opt/alt/python35/lib64/python3.5/asyncio/unix_events.py_sighandler_noop%srcCs|S)Nr)pathrrr<lambda>.src
seZdZdZdfddZddZfddZd	d
ZddZd
dZ	ddZ
ddZddddZddddZ
edddZddZeddddddddZedddd d!ddd"d#ZS)$_UnixSelectorEventLoopzdUnix event loop.

    Adds signal handling and UNIX Domain Socket support to SelectorEventLoop.
    Ncstj|i|_dS)N)super__init___signal_handlers)selfselector)	__class__rrr7sz_UnixSelectorEventLoop.__init__cCs
tjS)N)socketZ
socketpair)r rrr_socketpair;sz"_UnixSelectorEventLoop._socketpaircs8tjx$t|jD]}|j|qWdS)N)rcloselistrremove_signal_handler)r sig)r"rrr%>s
z_UnixSelectorEventLoop.closecCs+x$|D]}|sq|j|qWdS)N)_handle_signal)r datarrrr_process_self_dataCs
z)_UnixSelectorEventLoop._process_self_datac+Gstj|stj|r*td|j||jytj|jj	Wn=t
tfk
r}ztt
|WYdd}~XnXtj|||}||j|<y$tj|ttj|dWntk
r}z|j|=|jsXytjdWn;t
tfk
rW}ztjd|WYdd}~XnX|jtjkrtdj|nWYdd}~XnXdS)zAdd a handler for a signal.  UNIX only.

        Raise ValueError if the signal number is invalid or uncatchable.
        Raise RuntimeError if there is a problem setting up the handler.
        z3coroutines cannot be used with add_signal_handler()NFrzset_wakeup_fd(-1) failed: %szsig {} cannot be caught)rZiscoroutineZiscoroutinefunction	TypeError
_check_signalZ
_check_closedsignal
set_wakeup_fdZ_csockfileno
ValueErrorOSErrorRuntimeErrorstrrZHandlerrsiginterruptrinfoerrnoEINVALformat)r r(callbackargsexchandleZnexcrrradd_signal_handlerJs0

%

	#z)_UnixSelectorEventLoop.add_signal_handlercCsL|jj|}|dkr"dS|jr;|j|n
|j|dS)z2Internal helper that is the actual signal handler.N)rgetZ
_cancelledr'Z_add_callback_signalsafe)r r(r>rrrr)ws	z%_UnixSelectorEventLoop._handle_signalc&Cs|j|y|j|=Wntk
r3dSYnX|tjkrOtj}n	tj}ytj||WnRtk
r}z2|jtj	krt
dj|nWYdd}~XnX|jsytjdWn;t
tfk
r}ztjd|WYdd}~XnXdS)zwRemove a handler for a signal.  UNIX only.

        Return True if a signal handler was removed, False if not.
        Fzsig {} cannot be caughtNrzset_wakeup_fd(-1) failed: %sTr,)r.rKeyErrorr/SIGINTdefault_int_handlerSIG_DFLr3r8r9r4r:r0r2rr7)r r(Zhandlerr=rrrr's(

			#z,_UnixSelectorEventLoop.remove_signal_handlercCsbt|ts$tdj|d|ko>tjkns^tdj|tjdS)zInternal helper to validate a signal.

        Raise ValueError if the signal number is invalid or uncatchable.
        Raise RuntimeError if there is a problem setting up the handler.
        zsig must be an int, not {!r}rzsig {} out of range(1, {})N)
isinstanceintr-r:r/NSIGr2)r r(rrrr.s
z$_UnixSelectorEventLoop._check_signalcCst|||||S)N)_UnixReadPipeTransport)r pipeprotocolwaiterextrarrr_make_read_pipe_transportsz0_UnixSelectorEventLoop._make_read_pipe_transportcCst|||||S)N)_UnixWritePipeTransport)r rIrJrKrLrrr_make_write_pipe_transportsz1_UnixSelectorEventLoop._make_write_pipe_transportc	kstj}
|j}t||||||||d|d||	}|
j|j|j|y
|EdHWn+tk
r}
z|
}WYdd}
~
XnXd}|dk	r|j|j	EdH|WdQRX|S)NrKrL)
rget_child_watcherZ
create_future_UnixSubprocessTransportadd_child_handlerZget_pid_child_watcher_callback	Exceptionr%Z_wait)r rJr<shellstdinstdoutstderrbufsizerLkwargswatcherrKtranspr=errrrr_make_subprocess_transports$		



z1_UnixSelectorEventLoop._make_subprocess_transportcCs|j|j|dS)N)Zcall_soon_threadsafeZ_process_exited)r pid
returncoder\rrrrSsz._UnixSelectorEventLoop._child_watcher_callbacksslsockserver_hostnameccsc|dks!t|ts!t|rB|dkrZtdn|dk	rZtd|dk	r|dk	r~tdtjtjtjd}y&|jd|j||EdHWq6|j	Yq6Xn\|dkrtd|j
tjkstj|r)tdj
||jd|j||||EdH\}}||fS)Nz/you have to pass server_hostname when using sslz+server_hostname is only meaningful with sslz3path and sock can not be specified at the same timerFzno path and sock were specifiedz2A UNIX Domain Stream Socket was expected, got {!r})rEr5AssertionErrorr2r#AF_UNIXSOCK_STREAMsetblockingZsock_connectr%familyr_is_stream_socketr:Z_create_connection_transport)r protocol_factoryrrarbrc	transportrJrrrcreate_unix_connections:!	


z-_UnixSelectorEventLoop.create_unix_connectionbacklogdc
!Cst|trtd|dk	r|dk	r?tdt|}tjtjtj}|dd
kry,tj	t
j|jrt
j|WnIt
k
rYn8tk
r}ztjd||WYdd}~XnXy|j|Wqtk
ri}zK|j|jtjkrTdj|}ttj|dnWYdd}~Xq|jYqXnO|dkrtd|jtjkstj|rtdj|tj||g}	|j||jd	|j||||	|	S)Nz*ssl argument must be an SSLContext or Nonez3path and sock can not be specified at the same timerz2Unable to check or remove stale UNIX socket %r: %rzAddress {!r} is already in usez-path was not specified, and no sock specifiedz2A UNIX Domain Stream Socket was expected, got {!r}F)rro)rEboolr-r2_fspathr#rerfstatS_ISSOCKosst_moderemoveFileNotFoundErrorr3rerrorZbindr%r8Z
EADDRINUSEr:rhrriZServerZlistenrgZ_start_serving)
r rjrrbrmrar]r=msgZserverrrrcreate_unix_serversP	
&

	

z)_UnixSelectorEventLoop.create_unix_server)__name__
__module____qualname____doc__rr$r%r+r?r)r'r.rMrOr
r^rSrlrzrr)r"rr1s,-
 
%rset_blockingcCstj|ddS)NF)rtr)fdrrr_set_nonblocking9srcCs<tj|tj}|tjB}tj|tj|dS)N)fcntlZF_GETFLrt
O_NONBLOCKZF_SETFL)rflagsrrrr>s
cseZdZdZddfddZddZdd	Zd
dZdd
ZddZ	ddZ
ddZddZe
jrddZdddZddZddZS) rHiNcs*tj|||jd<||_||_|j|_||_d|_t	j
|jj}tj
|ptj|ptj|sd|_d|_d|_tdt|j|jj|jj||jj|jj|j|j|dk	r&|jjtj|ddS)NrIFz)Pipe transport is for pipes/sockets only.)rr_extra_loop_piper1_fileno	_protocol_closingrtfstatrurrS_ISFIFOrsS_ISCHRr2r	call_soonconnection_made_add_reader_read_readyr	_set_result_unless_cancelled)r looprIrJrKrLmode)r"rrrHs,
							
z_UnixReadPipeTransport.__init__cCs|jjg}|jdkr.|jdn|jrD|jd|jd|jt|jdd}|jdk	r|dk	rtj	||jt
j}|r|jdq|jdn,|jdk	r|jdn
|jddd	j|S)
Nclosedclosingzfd=%s	_selectorpollingidleopenz<%s> )
r"r{rappendrrgetattrrr
_test_selector_eventrZ
EVENT_READjoin)r r7r!rrrr__repr__es$	

z_UnixReadPipeTransport.__repr__cCsytj|j|j}WnLttfk
r6Yntk
rj}z|j|dWYdd}~XnX|r|jj	|ng|j
jrtj
d|d|_|j
j|j|j
j|jj|j
j|jddS)Nz"Fatal read error on pipe transportz%r was closed by peerT)rtreadrmax_sizeBlockingIOErrorInterruptedErrorr3_fatal_errorrZ
data_receivedr	get_debugrr7r_remove_readerrZeof_received_call_connection_lost)r r*r=rrrr{s#	z"_UnixReadPipeTransport._read_readycCs|jj|jdS)N)rrr)r rrr
pause_readingsz$_UnixReadPipeTransport.pause_readingcCs|jj|j|jdS)N)rrrr)r rrrresume_readingsz%_UnixReadPipeTransport.resume_readingcCs
||_dS)N)r)r rJrrrset_protocolsz#_UnixReadPipeTransport.set_protocolcCs|jS)N)r)r rrrget_protocolsz#_UnixReadPipeTransport.get_protocolcCs|jS)N)r)r rrr
is_closingsz!_UnixReadPipeTransport.is_closingcCs|js|jddS)N)r_close)r rrrr%s	z_UnixReadPipeTransport.closecCs4|jdk	r0tjd|t|jjdS)Nzunclosed transport %r)rwarningswarnResourceWarningr%)r rrr__del__sz_UnixReadPipeTransport.__del__zFatal error on pipe transportc	Cst|trL|jtjkrL|jjrwtjd||ddn+|jjd|d|d|d|j	i|j
|dS)Nz%r: %sexc_infoTmessage	exceptionrkrJ)rEr3r8ZEIOrrrdebugcall_exception_handlerrr)r r=rrrrrs!	z#_UnixReadPipeTransport._fatal_errorcCs6d|_|jj|j|jj|j|dS)NT)rrrrrr)r r=rrrrs	z_UnixReadPipeTransport._closecCsDz|jj|Wd|jjd|_d|_d|_XdS)N)rconnection_lostrr%r)r r=rrrrs
		z,_UnixReadPipeTransport._call_connection_losti)r{r|r}rrrrrrrrrr%rPY34rrrrrr)r"rrHDs	rHcseZdZddfddZddZddZdd	Zd
dZdd
ZddZ	ddZ
ddZddZddZ
ddZejrddZddZddd Zdd!d"Zd#d$ZS)%rNNc
sjtj||||jd<||_|j|_||_t|_d|_	d|_
tj|jj
}tj|}tj|}tj|}	|p|p|	sd|_d|_d|_tdt|j|jj|jj||	s|rAtjjdrA|jj|jj|j|j|dk	rf|jjtj|ddS)NrIrFz?Pipe transport is only for pipes, sockets and character devicesaix)rrrrr1rr	bytearray_buffer
_conn_lostrrtrrurrrrrsr2rrrrsysplatform
startswithrrr	r)
r rrIrJrKrLrZis_charZis_fifoZ	is_socket)r"rrrs2
							
z _UnixWritePipeTransport.__init__cCs#|jjg}|jdkr.|jdn|jrD|jd|jd|jt|jdd}|jdk	r|dk	rtj	||jt
j}|r|jdn
|jd|j}|jd|n,|jdk	r|jdn
|jdd	d
j
|S)Nrrzfd=%srrrz
bufsize=%srz<%s>r)r"r{rrrrrrr
rrZEVENT_WRITEget_write_buffer_sizer)r r7r!rrYrrrrs(	


z _UnixWritePipeTransport.__repr__cCs
t|jS)N)lenr)r rrrrsz-_UnixWritePipeTransport.get_write_buffer_sizecCsI|jjrtjd||jr;|jtn
|jdS)Nz%r was closed by peer)rrrr7rrBrokenPipeError)r rrrr
s
	z#_UnixWritePipeTransport._read_readycCst|tttfs*tt|t|trEt|}|sOdS|jsa|jr|jtj	krt
jd|jd7_dS|jsnyt
j|j|}Wnettfk
rd}YnHtk
r}z(|jd7_|j|ddSWYdd}~XnX|t|kr3dS|dkrUt||d}|jj|j|j|j|7_|jdS)Nz=pipe closed by peer or os.write(pipe, data) raised exception.rrz#Fatal write error on pipe transport)rEbytesr
memoryviewrdreprrrrZ!LOG_THRESHOLD_FOR_CONNLOST_WRITESrwarningrrtwriterrrrTrrrZ_add_writer_write_readyZ_maybe_pause_protocol)r r*nr=rrrrs4*
	
z_UnixWritePipeTransport.writecCs;|jstdytj|j|j}Wn{ttfk
rKYntk
r}zD|jj|j	d7_	|j
j|j|j|dWYdd}~XnX|t
|jkr|jj|j
j|j|j|jr|j
j|j|jddS|dkr7|jd|=dS)NzData should not be emptyrz#Fatal write error on pipe transportr)rrdrtrrrrrTclearrr_remove_writerrrZ_maybe_resume_protocolrrr)r rr=rrrr4s(
#

	
z$_UnixWritePipeTransport._write_readycCsdS)NTr)r rrr
can_write_eofNsz%_UnixWritePipeTransport.can_write_eofcCs[|jr
dS|jstd|_|jsW|jj|j|jj|jddS)NT)	rrrdrrrrrr)r rrr	write_eofQs			z!_UnixWritePipeTransport.write_eofcCs
||_dS)N)r)r rJrrrrZsz$_UnixWritePipeTransport.set_protocolcCs|jS)N)r)r rrrr]sz$_UnixWritePipeTransport.get_protocolcCs|jS)N)r)r rrrr`sz"_UnixWritePipeTransport.is_closingcCs'|jdk	r#|jr#|jdS)N)rrr)r rrrr%csz_UnixWritePipeTransport.closecCs4|jdk	r0tjd|t|jjdS)Nzunclosed transport %r)rrrrr%)r rrrrlsz_UnixWritePipeTransport.__del__cCs|jddS)N)r)r rrrabortqsz_UnixWritePipeTransport.abortzFatal error on pipe transportc	Csyt|tjr=|jjrhtjd||ddn+|jjd|d|d|d|ji|j	|dS)Nz%r: %srTrrrkrJ)
rErZ_FATAL_ERROR_IGNORErrrrrrr)r r=rrrrrts	z$_UnixWritePipeTransport._fatal_errorcCs_d|_|jr%|jj|j|jj|jj|j|jj|j|dS)NT)	rrrrrrrrr)r r=rrrrs		
z_UnixWritePipeTransport._closecCsDz|jj|Wd|jjd|_d|_d|_XdS)N)rrrr%r)r r=rrrrs
		z-_UnixWritePipeTransport._call_connection_lost)r{r|r}rrrrrrrrrrrr%rrrrrrrrr)r"rrNs$%	!		rNset_inheritablecCsittdd}tj|tj}|sJtj|tj||Bntj|tj||@dS)NZ
FD_CLOEXECr)rrZF_GETFDZF_SETFD)rZinheritableZcloexec_flagoldrrr_set_inheritables
rc@seZdZddZdS)rQc	Ksd}|tjkr=|jj\}}t|jdtj|d|d|d|d|ddd|||_|dk	r|jt	|j
dd	||j_dS)
NFrUrVrWrXZuniversal_newlinesrYwb	buffering)
subprocessPIPErr$rr1Popen_procr%rdetachrV)	r r<rUrVrWrXrYrZZstdin_wrrr_starts
z_UnixSubprocessTransport._startN)r{r|r}rrrrrrQsrQc@s^eZdZdZddZddZddZdd	Zd
dZdd
Z	dS)raHAbstract base class for monitoring child processes.

    Objects derived from this class monitor a collection of subprocesses and
    report their termination or interruption by a signal.

    New callbacks are registered with .add_child_handler(). Starting a new
    process must be done within a 'with' block to allow the watcher to suspend
    its activity until the new process if fully registered (this is needed to
    prevent a race condition in some implementations).

    Example:
        with watcher:
            proc = subprocess.Popen("sleep 1")
            watcher.add_child_handler(proc.pid, callback)

    Notes:
        Implementations of this class must be thread-safe.

        Since child watcher objects may catch the SIGCHLD signal and call
        waitpid(-1), there should be only one active object per process.
    cGs
tdS)aRegister a new child handler.

        Arrange for callback(pid, returncode, *args) to be called when
        process 'pid' terminates. Specifying another callback for the same
        process replaces the previous handler.

        Note: callback() must be thread-safe.
        N)NotImplementedError)r r_r;r<rrrrRs	z&AbstractChildWatcher.add_child_handlercCs
tdS)zRemoves the handler for process 'pid'.

        The function returns True if the handler was successfully removed,
        False if there was nothing to remove.N)r)r r_rrrremove_child_handlersz)AbstractChildWatcher.remove_child_handlercCs
tdS)zAttach the watcher to an event loop.

        If the watcher was previously attached to an event loop, then it is
        first detached before attaching to the new loop.

        Note: loop may be None.
        N)r)r rrrrattach_loopsz AbstractChildWatcher.attach_loopcCs
tdS)zlClose the watcher.

        This must be called to make sure that any underlying resource is freed.
        N)r)r rrrr%szAbstractChildWatcher.closecCs
tdS)zdEnter the watcher's context and allow starting new processes

        This function must return selfN)r)r rrr	__enter__szAbstractChildWatcher.__enter__cCs
tdS)zExit the watcher's contextN)r)r abcrrr__exit__szAbstractChildWatcher.__exit__N)
r{r|r}r~rRrrr%rrrrrrrs
c@sdeZdZddZddZddZddZd	d
ZddZd
dZ	dS)BaseChildWatchercCsd|_i|_dS)N)r
_callbacks)r rrrrs	zBaseChildWatcher.__init__cCs|jddS)N)r)r rrrr%	szBaseChildWatcher.closecCs
tdS)N)r)r expected_pidrrr_do_waitpidszBaseChildWatcher._do_waitpidcCs
tdS)N)r)r rrr_do_waitpid_allsz BaseChildWatcher._do_waitpid_allcCs|dks$t|tjs$t|jdk	rX|dkrX|jrXtjdt|jdk	rz|jj	t
j||_|dk	r|jt
j|j
|jdS)NzCA loop is being detached from a child watcher with pending handlers)rErZAbstractEventLooprdrrrrRuntimeWarningr'r/SIGCHLDr?	_sig_chldr)r rrrrrs$$	zBaseChildWatcher.attach_loopcCsVy|jWnAtk
rQ}z!|jjddd|iWYdd}~XnXdS)Nrz$Unknown exception in SIGCHLD handlerr)rrTrr)r r=rrrr&s	zBaseChildWatcher._sig_chldcCsAtj|rtj|Stj|r9tj|S|SdS)N)rtWIFSIGNALEDWTERMSIG	WIFEXITEDWEXITSTATUS)r statusrrr_compute_returncode2s

z$BaseChildWatcher._compute_returncodeN)
r{r|r}rr%rrrrrrrrrrsrcspeZdZdZfddZddZddZdd	Zd
dZdd
Z	ddZ
S)rad'Safe' child watcher implementation.

    This implementation avoids disrupting other code spawning processes by
    polling explicitly each process in the SIGCHLD handler instead of calling
    os.waitpid(-1).

    This is a safe solution but it has a significant overhead when handling a
    big number of children (O(n) each time SIGCHLD is raised)
    cs|jjtjdS)N)rrrr%)r )r"rrr%Ks
zSafeChildWatcher.closecCs|S)Nr)r rrrrOszSafeChildWatcher.__enter__cCsdS)Nr)r rrrrrrrRszSafeChildWatcher.__exit__cGs?|jdkrtd||f|j|<|j|dS)NzICannot add child handler, the child watcher does not have a loop attached)rr4rr)r r_r;r<rrrrRUs
	z"SafeChildWatcher.add_child_handlercCs/y|j|=dSWntk
r*dSYnXdS)NTF)rrA)r r_rrrr`s


z%SafeChildWatcher.remove_child_handlercCs+x$t|jD]}|j|qWdS)N)r&rr)r r_rrrrgsz SafeChildWatcher._do_waitpid_allcCs
|dkstytj|tj\}}Wn.tk
ra|}d}tjd|YnBX|dkrrdS|j|}|jj	rtj
d||y|jj|\}}Wn7t
k
r|jj	rtjd|ddYnX||||dS)Nrz8Unknown child process pid %d, will report returncode 255z$process %s exited with returncode %sz'Child watcher got an unexpected pid: %rrT)rdrtwaitpidWNOHANGChildProcessErrorrrrrrrrpoprA)r rr_rr`r;r<rrrrls,
	

	zSafeChildWatcher._do_waitpid)r{r|r}r~r%rrrRrrrrr)r"rr@s	csveZdZdZfddZfddZddZdd	Zd
dZdd
Z	ddZ
S)raW'Fast' child watcher implementation.

    This implementation reaps every terminated processes by calling
    os.waitpid(-1) directly, possibly breaking other code spawning processes
    and waiting for their termination.

    There is no noticeable overhead when handling a big number of children
    (O(1) each time a child terminates).
    cs2tjtj|_i|_d|_dS)Nr)rr	threadingZLock_lock_zombies_forks)r )r"rrrs
	zFastChildWatcher.__init__cs+|jj|jjtjdS)N)rrrrr%)r )r"rrr%s

zFastChildWatcher.closec
Cs(|j|jd7_|SWdQRXdS)Nr)rr)r rrrrs
zFastChildWatcher.__enter__c
Csg|jG|jd8_|js,|jr0dSt|j}|jjWdQRXtjd|dS)Nrz5Caught subprocesses termination from unknown pids: %s)rrrr5rrr)r rrrZcollateral_victimsrrrrs
zFastChildWatcher.__exit__cGs|jstd|jdkr0td|jGy|jj|}Wn)tk
r{||f|j|<dSYnXWdQRX||||dS)NzMust use the context managerzICannot add child handler, the child watcher does not have a loop attached)	rrdrr4rrrrAr)r r_r;r<r`rrrrRs	

z"FastChildWatcher.add_child_handlercCs/y|j|=dSWntk
r*dSYnXdS)NTF)rrA)r r_rrrrs


z%FastChildWatcher.remove_child_handlercCs9x2ytjdtj\}}Wntk
r:dSYn X|dkrKdS|j|}|jy|jj|\}}WnStk
r|j	r||j
|<|jjrt
jd||wd}Yn#X|jjrt
jd||WdQRX|dkr!t
jd||q||||qWdS)Nrrz,unknown process %s exited with returncode %sz$process %s exited with returncode %sz8Caught subprocess termination from unknown pid: %d -> %dr,)rtrrrrrrrrArrrrrrr)r r_rr`r;r<rrrrs6
	

	
	
	
z FastChildWatcher._do_waitpid_all)r{r|r}r~rr%rrrRrrrr)r"rrs	csdeZdZdZeZfddZddZfddZdd	Z	d
dZ
S)_UnixDefaultEventLoopPolicyz:UNIX event loop policy with a watcher for child processes.cstjd|_dS)N)rr_watcher)r )r"rrrs
z$_UnixDefaultEventLoopPolicy.__init__c
Cs^tjN|jdkrSt|_ttjtjrS|jj|j	j
WdQRXdS)N)rrrrrErcurrent_thread_MainThreadr_localr)r rrr
_init_watchers
z)_UnixDefaultEventLoopPolicy._init_watchercsKtj||jdk	rGttjtjrG|jj|dS)zSet the event loop.

        As a side effect, if a child watcher was set before, then calling
        .set_event_loop() from the main thread will call .attach_loop(loop) on
        the child watcher.
        N)rset_event_looprrErrrr)r r)r"rrr
sz*_UnixDefaultEventLoopPolicy.set_event_loopcCs |jdkr|j|jS)zzGet the watcher for child processes.

        If not yet set, a SafeChildWatcher object is automatically created.
        N)rr)r rrrrPs
z-_UnixDefaultEventLoopPolicy.get_child_watchercCsJ|dks!t|ts!t|jdk	r=|jj||_dS)z$Set the watcher for child processes.N)rErrdrr%)r r[rrrset_child_watcher%s!
z-_UnixDefaultEventLoopPolicy.set_child_watcher)r{r|r}r~rZ
_loop_factoryrrrrPrrr)r"rrs
r)5r~r8rtr/r#rrrrrrrrrrrrr	r
rrr
logr__all__rImportErrorrZfspathrqAttributeErrorZBaseSelectorEventLooprhasattrrrZ
ReadTransportrHZ_FlowControlMixinZWriteTransportrNrrZBaseSubprocessTransportrQrrrrZBaseDefaultEventLoopPolicyrrrrrrr<module>sh


F=On2