<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>

Yf#                 @   sv  d  d d g Z  d d l Z d d l Z d d l Z d d l Z d d l m Z y e j j e j	    Z
 Wn e k
 r d Z
 Yn Xd d   Z d d   Z d d	   Z Gd
 d    d  e  Z Gd d   d e  Z Gd d   d e  Z e   a e j d  a e   a [ i  Z xP e e j j    D]9 \ Z Z e d d  d k r,d e k r,e e e <q,We   Z d S)BaseProcesscurrent_processactive_children    N)WeakSetc               C   s   t  S)z@
    Return process object representing the current process
    )_current_process r   r   </opt/alt/python35/lib64/python3.5/multiprocessing/process.pyr   #   s    c               C   s   t    t t  S)zN
    Return list of process objects corresponding to live child processes
    )_cleanuplist	_childrenr   r   r   r   r   )   s    c              C   s=   x6 t  t  D]( }  |  j j   d  k	 r t j |   q Wd  S)N)r
   r   _popenpolldiscard)pr   r   r   r	   4   s    r	   c            	   @   sK  e  Z d  Z d Z d d   Z d d d f  i  d d d d Z d d	   Z d
 d   Z d d   Z d d d  Z	 d d   Z
 e d d    Z e j d d    Z e d d    Z e j d d    Z e d d    Z e j d d    Z e d d    Z e d d    Z e Z e d d     Z d! d"   Z d# d$   Z d S)%r   z
    Process objects represent activity that is run in a separate process

    The class is analogous to `threading.Thread`
    c             C   s
   t   d  S)N)NotImplementedError)selfr   r   r   _PopenD   s    zBaseProcess._PopenNdaemonc            C   s   t  t  } t j | f |  _ t j j   |  _ t j   |  _ d  |  _	 | |  _
 t |  |  _ t |  |  _ | p t |   j d d j d d   |  j D  |  _ | d  k	 r | |  _ t j |   d  S)N-:c             s   s   |  ] } t  |  Vq d  S)N)str).0ir   r   r   	<genexpr>S   s    z'BaseProcess.__init__.<locals>.<genexpr>)next_process_counterr   	_identity_configcopyosgetpid_parent_pidr   _targettuple_argsdict_kwargstype__name__join_namer   	_danglingadd)r   grouptargetnameargskwargsr   countr   r   r   __init__G   s    		#	zBaseProcess.__init__c             C   s#   |  j  r |  j  |  j |  j   d S)zQ
        Method to be run in sub-process; can be overridden in sub-class
        N)r"   r$   r&   )r   r   r   r   runX   s    	zBaseProcess.runc             C   sK   t    |  j |   |  _ |  j j |  _ |  ` |  ` |  ` t j	 |   d S)z%
        Start child process
        N)
r	   r   r   sentinel	_sentinelr"   r$   r&   r   r,   )r   r   r   r   start_   s
    	zBaseProcess.startc             C   s   |  j  j   d S)zT
        Terminate process; sends SIGTERM signal or uses TerminateProcess()
        N)r   	terminate)r   r   r   r   r8   p   s    zBaseProcess.terminatec             C   s/   |  j  j |  } | d k	 r+ t j |   d S)z5
        Wait until child process terminates
        N)r   waitr   r   )r   Ztimeoutresr   r   r   r)   v   s    zBaseProcess.joinc             C   s@   |  t  k r d S|  j d k r# d S|  j j   |  j j d k S)z1
        Return whether process is alive
        TNF)r   r   r   
returncode)r   r   r   r   is_alive   s    zBaseProcess.is_alivec             C   s   |  j  S)N)r*   )r   r   r   r   r/      s    zBaseProcess.namec             C   s   | |  _  d  S)N)r*   )r   r/   r   r   r   r/      s    c             C   s   |  j  j d d  S)z4
        Return whether process is a daemon
        r   F)r   get)r   r   r   r   r      s    zBaseProcess.daemonc             C   s   | |  j  d <d S)z1
        Set whether process is a daemon
        r   N)r   )r   Zdaemonicr   r   r   r      s    c             C   s   |  j  d S)Nauthkey)r   )r   r   r   r   r>      s    zBaseProcess.authkeyc             C   s   t  |  |  j d <d S)z2
        Set authorization key of process
        r>   N)AuthenticationStringr   )r   r>   r   r   r   r>      s    c             C   s#   |  j  d k r |  j  S|  j  j   S)zM
        Return exit code of process or `None` if it has yet to stop
        N)r   r   )r   r   r   r   exitcode   s    zBaseProcess.exitcodec             C   s-   |  t  k r t j   S|  j o( |  j j Sd S)zU
        Return identifier (PID) of process or `None` if it has yet to start
        N)r   r   r    r   pid)r   r   r   r   ident   s    
zBaseProcess.identc             C   s0   y |  j  SWn t k
 r+ t d   Yn Xd S)z{
        Return a file descriptor (Unix) or handle (Windows) suitable for
        waiting for process termination.
        zprocess not startedN)r6   AttributeError
ValueError)r   r   r   r   r5      s    zBaseProcess.sentinelc             C   s   |  t  k r d } n] |  j t j   k r3 d } n? |  j d  k rK d } n' |  j j   d  k	 rl |  j } n d } t |  t k r | d k r d } n d t	 j
 | |  } d t |   j |  j | |  j r d p d	 f S)
NZstartedunknowninitialr   Zstoppedzstopped[%s]z<%s(%s, %s%s)>z daemon )r   r!   r   r    r   r   r@   r'   int_exitcode_to_namer=   r(   r*   r   )r   Zstatusr   r   r   __repr__   s    				zBaseProcess.__repr__c              C   s  d d l  m } m } zgy |  j d  k	 r; | j |  j  t j d  a t   a	 | j
   t } |  a z | j j   | j   Wd  ~ X| j d  z |  j   d } Wd  | j   XWn t k
 rA} zd | j s d } nM t | j d t  r| j d } n' t j j t | j d  d  d } WYd  d  } ~ Xn; d } d d  l } t j j d |  j  | j   Yn XWd  | j d |  t j j   t j j   X| S)N   )utilcontextz child process calling self.run()r   
zProcess %s:
z process exiting with exitcode %d)rG   rL   rM   Z_start_methodZ_force_start_method	itertoolsr2   r   setr   Z_close_stdinr   Z_finalizer_registryclearZ_run_after_forkersinfor4   Z_exit_function
SystemExitr0   
isinstancerH   sysstderrwriter   	tracebackr/   	print_excstdoutflush)r   rL   rM   Zold_processr@   erX   r   r   r   
_bootstrap   sD    	


		!zBaseProcess._bootstrap)r(   
__module____qualname____doc__r   r3   r4   r7   r8   r)   r<   propertyr/   setterr   r>   r@   rB   rA   r5   rJ   r]   r   r   r   r   r   >   s*   
	
c               @   s   e  Z d  Z d d   Z d S)r?   c             C   s>   d d l  m } |   d  k r+ t d   t t |   f f S)NrK   )get_spawning_popenzJPickling an AuthenticationString object is disallowed for security reasons)rM   rc   	TypeErrorr?   bytes)r   rc   r   r   r   
__reduce__  s
    	zAuthenticationString.__reduce__N)r(   r^   r_   rf   r   r   r   r   r?     s   r?   c               @   s   e  Z d  Z d d   Z d S)_MainProcessc             C   sL   f  |  _  d |  _ d  |  _ d  |  _ d t t j d   d d i |  _ d  S)NZMainProcessr>       Z	semprefixz/mp)r   r*   r!   r   r?   r   urandomr   )r   r   r   r   r3   (  s    				z_MainProcess.__init__N)r(   r^   r_   r3   r   r   r   r   rg   &  s   rg   rK      ZSIG_) __all__r   rU   signalrO   _weakrefsetr   pathabspathgetcwdZORIGINAL_DIROSErrorr   r   r	   objectr   re   r?   rg   r   r2   r   rP   r   rI   r
   __dict__itemsr/   Zsignumr+   r   r   r   r   <module>
   s0   
		""