HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //lib/python3.6/site-packages/supervisor/__pycache__/rpcinterface.cpython-36.pyc
3

�k�`��@s~ddlZddlZddlZddlZddlZddlmZddlmZddlmZddl	m
Z
mZddlm
Z
ddlmZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZddlmZddlmZddlmZddlmZmZmZddlmZddlm Z ddlm!Z!ddlm"Z"ddlm#Z#m$Z$m%Z%dZ&Gdd�d�Z'dd�Z(dd�Z)dd�Z*d d!�Z+d"d#�Z,d$d%�Z-dS)&�N)�	as_string)�as_bytes)�unicode)�	Automatic�
signal_number)�readFile)�tailFile)�
NotExecutable)�NotFound)�NoPermission)�
make_namespec)�split_namespec)�VERSION)�notify)�RemoteCommunicationEvent)�NOT_DONE_YET)�
capped_int�Faults�RPCError)�SupervisorStates)�getSupervisorStateDescription)�
ProcessStates)�getProcessStateDescription)�RUNNING_STATES�STOPPED_STATES�SIGNALLABLE_STATESz3.0c@sneZdZdd�Zdd�Zdd�ZeZdd�Zd	d
�Zdd�Z	d
d�Z
dd�ZeZdd�Z
dd�Zdd�Zdd�Zdd�Zdd�ZdTdd�Zd d!�ZdUd#d$�ZdVd%d&�ZdWd'd(�ZdXd)d*�ZdYd+d,�ZdZd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9d:�Z d;d<�Z!d=d>�Z"d?d@�Z#dAdB�Z$e$Z%dCdD�Z&dEdF�Z'dGdH�Z(e(Z)dIdJ�Z*dKdL�Z+e+Z,dMdN�Z-dOdP�Z.dQdR�Z/dSS)[�SupervisorNamespaceRPCInterfacecCs
||_dS)N)�supervisord)�selfr�r�"/usr/lib/python3.6/rpcinterface.py�__init__0sz(SupervisorNamespaceRPCInterface.__init__cCs4||_t|jjjt�r0|jjjtjkr0tt	j
��dS)N)Zupdate_text�
isinstancer�options�mood�intr�RUNNINGrrZSHUTDOWN_STATE)r�textrrr �_update3sz'SupervisorNamespaceRPCInterface._updatecCs|jd�tS)zj Return the version of the RPC API used by supervisord

        @return string version version id
        �
getAPIVersion)r(�API_VERSION)rrrr r);s
z-SupervisorNamespaceRPCInterface.getAPIVersioncCs|jd�tS)zw Return the version of the supervisor package in use by supervisord

        @return string version version id
        �getSupervisorVersion)r(r)rrrr r+Es
z4SupervisorNamespaceRPCInterface.getSupervisorVersioncCs|jd�|jjjS)zh Return identifying string of supervisord

        @return string identifier identifying string
        �getIdentification)r(rr#Z
identifier)rrrr r,Ms
z1SupervisorNamespaceRPCInterface.getIdentificationcCs*|jd�|jjj}t|�}||d�}|S)z� Return current state of supervisord as a struct

        @return struct A struct with keys int statecode, string statename
        �getState)Z	statecode�	statename)r(rr#r$r)r�stater.�datarrr r-Us

z(SupervisorNamespaceRPCInterface.getStatecCs|jd�|jjj�S)z@ Return the PID of supervisord

        @return int PID
        �getPID)r(rr#Zget_pid)rrrr r1ds
z&SupervisorNamespaceRPCInterface.getPIDcCs�|jd�|jjj}|dks*tjj|�r6ttj	|��yt
t|t|�t|���St
k
r�}z|jd}ttt|���WYdd}~XnXdS)z� Read length bytes from the main log starting at offset

        @param int offset         offset to start reading from.
        @param int length         number of bytes to read from the log.
        @return string result     Bytes of log
        �readLogNr)r(rr#�logfile�os�path�existsrr�NO_FILErrr%�
ValueError�args�getattr)r�offset�lengthr3�inst�whyrrr r2ls


z'SupervisorNamespaceRPCInterface.readLogcCs�|jd�|jjj}|dks,|jjj|�r6ttj��y|jjj|�Wn"t	t
fk
rjttj��YnXx6|jjjj
D]&}t|d�rz|jjjjd�|j�qzWdS)z^ Clear the main log.

        @return boolean result always returns True unless error
        �clearLogN�reopenzreopening log fileT)r(rr#r3r6rrr7�remove�OSError�IOError�FAILEDZloggerZhandlers�hasattr�infor@)rr3Zhandlerrrr r?�s



z(SupervisorNamespaceRPCInterface.clearLogcCs|jd�tj|jj_dS)zk Shut down the supervisor process

        @return boolean result always returns True unless error
        �shutdownT)r(rZSHUTDOWNrr#r$)rrrr rG�s
z(SupervisorNamespaceRPCInterface.shutdowncCs|jd�tj|jj_dS)zi Restart the supervisor process

        @return boolean result  always return True unless error
        �restartT)r(rZ
RESTARTINGrr#r$)rrrr rH�s
z'SupervisorNamespaceRPCInterface.restartcCs�|jd�y|jjjdd�Wn.tk
rL}zttj|��WYdd}~XnX|jj�\}}}dd�|D�}dd�|D�}dd�|D�}|||ggS)	a�
        Reload the configuration.

        The result contains three arrays containing names of process
        groups:

        * `added` gives the process groups that have been added
        * `changed` gives the process groups whose contents have
          changed
        * `removed` gives the process groups that are no longer
          in the configuration

        @return array result  [[added, changed, removed]]

        �reloadConfigF)Zdo_usageNcSsg|]
}|j�qSr)�name)�.0�grouprrr �
<listcomp>�s[email protected].<locals>.<listcomp>cSsg|]
}|j�qSr)rJ)rKrLrrr rM�scSsg|]
}|j�qSr)rJ)rKrLrrr rM�s)	r(rr#Zprocess_configr8rrZCANT_REREADZdiff_to_active)r�msgZaddedZchangedZremovedrrr rI�s
z,SupervisorNamespaceRPCInterface.reloadConfigcCsX|jd�x<|jjjD].}|j|kr|jj|�}|s@ttj|��dSqWttj	|��dS)z� Update the config for a running process from config file.

        @param string name         name of process group to add
        @return boolean result     true if successful
        �addProcessGroupTN)
r(rr#�process_group_configsrJZadd_process_grouprrZ
ALREADY_ADDED�BAD_NAME)rrJ�config�resultrrr rO�s

z/SupervisorNamespaceRPCInterface.addProcessGroupcCsB|jd�||jjkr"ttj|��|jj|�}|s>ttj|��dS)z� Remove a stopped process from the active configuration.

        @param string name         name of process group to remove
        @return boolean result     Indicates whether the removal was successful
        �removeProcessGroupT)r(r�process_groupsrrrQZremove_process_groupZ
STILL_RUNNING)rrJrSrrr rT�s
z2SupervisorNamespaceRPCInterface.removeProcessGroupFcCs�g}|rxt|jjj��}|j�x�|D]L}|jj|}t|jj��}|j�x$|D]}|j|}|j||f�qRWq&WnXt|jjj��}	|	j�x>|	D]6}t|jj��}
|
j�x|
D]}|j||f�q�Wq�W|S)N)�listrrU�keys�sort�	processes�append�values)r�lexical�
all_processesZgroup_names�
group_namerLZ
process_names�process_name�process�groupsrYrrr �_getAllProcesses�s&




z0SupervisorNamespaceRPCInterface._getAllProcessescCsft|�\}}|jjj|�}|dkr.ttj|��|dkr>|dfS|jj|�}|dkr^ttj|��||fS)N)r
rrU�getrrrQrY)rrJr^r_rLr`rrr �_getGroupAndProcesssz3SupervisorNamespaceRPCInterface._getGroupAndProcessTc
sP|jd�|j��\}��dkr8t��\}}|j||�Sy�j�\}}Wnjtk
r|}zttj|j	d��WYdd}~Xn8t
tfk
r�}zttj|j	d��WYdd}~XnX�j
�tkr�ttj����j
�tjkr�ttjd����j�|jj��j�rttj����j�|�rL�j
�tjk�rL��fdd�}	d|	_||	_|	SdS)	z� Start a process

        @param string name Process name (or ``group:name``, or ``group:*``)
        @param boolean wait Wait for process to be fully started
        @return boolean result     Always true unless error

        �startProcessNrz!%s is in an unknown process statecsH�jrttj����j�}|tjtjfkr6ttj���|tjkrDdSt	S)NT)
�spawnerrrr�SPAWN_ERROR�	get_staterZSTARTINGr&ZABNORMAL_TERMINATIONr)r/)rJr`rr �onwaitNs
z<SupervisorNamespaceRPCInterface.startProcess.<locals>.onwaitg�������?T)r(rdr
�startProcessGroupZget_execv_argsr
rrr7r9r	rZNOT_EXECUTABLErhrZALREADY_STARTEDrZUNKNOWNrDZspawnr�reaprfrgZ
transitionr&�delay�rpcinterface)
rrJ�waitrLr^r_�filename�argvr>rir)rJr`r res6
"$


z,SupervisorNamespaceRPCInterface.startProcesscsv|jd�|jjj|���dkr,ttj|��t�jj	��}|j
��fdd�|D�}t|t|j
|d�}d|_||_|S)z� Start all processes in the group named 'name'

        @param string name     The group name
        @param boolean wait    Wait for each process to be fully started
        @return array result   An array of process status info structs
        rjNcsg|]}�|f�qSrr)rKr`)rLrr rMrszESupervisorNamespaceRPCInterface.startProcessGroup.<locals>.<listcomp>)rng�������?)r(rrUrcrrrQrVrYr[rX�make_allfunc�isNotRunningrerlrm)rrJrnrY�startallr)rLr rjbs

z1SupervisorNamespaceRPCInterface.startProcessGroupcCs4|jd�|j�}t|t|j|d�}d|_||_|S)z� Start all processes listed in the configuration file

        @param boolean wait    Wait for each process to be fully started
        @return array result   An array of process status info structs
        �startAllProcesses)rng�������?)r(rbrqrrrerlrm)rrnrYrsrrr rt{s

z1SupervisorNamespaceRPCInterface.startAllProcessescs�|jd�|j|�\}��dkr8t|�\}}|j||�S�j�tkrPttj|���j	�}|dk	rlttj
|��|jj�|r��j�t
kr��fdd�}d|_||_|SdS)a Stop a process named by name

        @param string name  The name of the process to stop (or 'group:name')
        @param boolean wait        Wait for the process to be fully stopped
        @return boolean result     Always return True unless error
        �stopProcessNcs�j��j�tkrtSdS)NT)Zstop_reportrhrrr)r`rr ri�sz;SupervisorNamespaceRPCInterface.stopProcess.<locals>.onwaitrT)r(rdr
�stopProcessGrouprhrrr�NOT_RUNNING�stoprDrrkrrlrm)rrJrnrLr^r_rNrir)r`r ru�s"

	z+SupervisorNamespaceRPCInterface.stopProcesscsv|jd�|jjj|���dkr,ttj|��t�jj	��}|j
��fdd�|D�}t|t|j
|d�}d|_||_|S)z� Stop all processes in the process group named 'name'

        @param string name     The group name
        @param boolean wait    Wait for each process to be fully stopped
        @return array result   An array of process status info structs
        rvNcsg|]}�|f�qSrr)rKr`)rLrr rM�szDSupervisorNamespaceRPCInterface.stopProcessGroup.<locals>.<listcomp>)rng�������?)r(rrUrcrrrQrVrYr[rXrq�	isRunningrurlrm)rrJrnrY�killallr)rLr rv�s

z0SupervisorNamespaceRPCInterface.stopProcessGroupcCs4|jd�|j�}t|t|j|d�}d|_||_|S)z� Stop all processes in the process list

        @param  boolean wait   Wait for each process to be fully stopped
        @return array result   An array of process status info structs
        �stopAllProcesses)rng�������?)r(rbrqryrurlrm)rrnrYrzrrr r{�s

z0SupervisorNamespaceRPCInterface.stopAllProcessesc	Cs�|jd�|j|�\}}|dkr:t|�\}}|j||d�Syt|�}Wn tk
rfttj|��YnX|j	�t
kr�ttj|��|j|�}|dk	r�ttj
|��dS)z� Send an arbitrary UNIX signal to the process named by name

        @param string name    Name of the process to signal (or 'group:name')
        @param string signal  Signal to send, as name ('HUP') or number ('1')
        @return boolean
        �
signalProcessN)�signalT)r(rdr
�signalProcessGrouprr8rrZ
BAD_SIGNALrhrrwr}rD)	rrJr}rLr`r^r_ZsigrNrrr r|�s

z-SupervisorNamespaceRPCInterface.signalProcesscsz|jjj|��|jd��dkr,ttj|��t�jj	��}|j
��fdd�|D�}t|t|j
|d�}|�}|jd�|S)z� Send a signal to all processes in the group named 'name'

        @param string name    The group name
        @param string signal  Signal to send, as name ('HUP') or number ('1')
        @return array
        r~Ncsg|]}�|f�qSrr)rKr`)rLrr rMszFSupervisorNamespaceRPCInterface.signalProcessGroup.<locals>.<listcomp>)r})rrUrcr(rrrQrVrYr[rXrq�
isSignallabler|)rrJr}rYZsendallrSr)rLr r~s


z2SupervisorNamespaceRPCInterface.signalProcessGroupcCs.|j�}t|t|j|d�}|�}|jd�|S)z� Send a signal to all processes in the process list

        @param string signal  Signal to send, as name ('HUP') or number ('1')
        @return array         An array of process status info structs
        )r}�signalAllProcesses)rbrqrr|r()rr}rYZ	signalallrSrrr r� s

z2SupervisorNamespaceRPCInterface.signalAllProcessescCs�|jd�g}x�|jjjD]�}|j|jjk}x�|jD]�}|j|j|j	|j|j
||j|j|j
|j|j
|j|j|j|j|j|j|jt|j�|j|j|j|j|j|j|jd�}|jdd�|j�D��|jdd�|j�D��|j |�q4WqW|j!dd�d�|S)	z� Get info about all available process configurations. Each struct
        represents a single process (i.e. groups get flattened).

        @return array result  An array of process config info structs
        �getAllConfigInfo)�	autostart�command�	exitcodesrLZ
group_prio�inuse�killasgrouprJZprocess_prio�redirect_stderr�startretries�	startsecs�stdout_capture_maxbytes�stdout_events_enabled�stdout_logfile�stdout_logfile_backups�stdout_logfile_maxbytes�
stdout_syslog�
stopsignal�stopwaitsecs�stderr_capture_maxbytes�stderr_events_enabled�stderr_logfile�stderr_logfile_backups�stderr_logfile_maxbytes�
stderr_syslogcss"|]\}}|tkr|dfVqdS)�autoN)r)rK�k�vrrr �	<genexpr>UszCSupervisorNamespaceRPCInterface.getAllConfigInfo.<locals>.<genexpr>css"|]\}}|dkr|dfVqdS)NZnoner)rKr�r�rrr r�VscSs|dS)NrJr)�rrrr �<lambda>YszBSupervisorNamespaceRPCInterface.getAllConfigInfo.<locals>.<lambda>)�key)"r(rr#rPrJrUZprocess_configsr�r�r�Zpriorityr�r�r�r�r�r�r�r�r�r�r%r�r�r�r�r�r�r�r��update�itemsrZrX)rZ
configinfoZgconfigr�Zpconfig�drrr r�-sH

z0SupervisorNamespaceRPCInterface.getAllConfigInfocCs�|d}|tjkr�|d}|d}tjtj|�dd��}tjtj|�dd��}||}t|�dkrptjd�}d|d|f}nx|tjtjfkr�|d}|s�d	|d
}nN|tj	tj
fkr�|dr�|d}	tjtj|	�dd��}
|
jd
�}q�d}nd}|S)Nr/�start�now�rzpid %s, uptime %s�pidrfzunknown error (try "tail %s")rJrx�z%b %d %I:%M %pzNot started�)
rr&�datetime�timeZgmtime�_total_seconds�	timedeltaZFATALZBACKOFFZSTOPPEDZEXITEDZ	localtimeZstrftime)rrFr/r�r�Zstart_dtZnow_dtZuptimeZdescrxZstop_dtrrr �_interpretProcessInfo\s,

z5SupervisorNamespaceRPCInterface._interpretProcessInfocCs�|jd�|j|�\}}|dkr,ttj|��t|j�}t|j�}t|j��}|j	�}|j
p\d}|jpfd}	|jj
prd}
|jjp~d}|jj|jj||||t|�||	|
|
||jd�
}|j|�}
|
|d<|S)z� Get info about a process named name

        @param string name The name of the process (or 'group:name')
        @return struct result     A structure containing data about the process
        �getProcessInfoNr�r)
rJrLr�rxr�r/r.rf�
exitstatusr3r�r�r��description)r(rdrrrQrZ	laststartZlaststop�_nowrhrfr�rRr�r�rJrr�r�)rrJrLr`r�rxr�r/rfr�r�r�rFr�rrr r�{s8






z.SupervisorNamespaceRPCInterface.getProcessInfocCstj�S)N)r�)rrrr r��sz$SupervisorNamespaceRPCInterface._nowcCsR|jd�|jdd�}g}x2|D]*\}}t|jj|jj�}|j|j|��q W|S)zh Get info about all processes

        @return array result  An array of process status results
        �getAllProcessInfoT)r\)r(rbrrRrJrZr�)rr]�outputrLr`rJrrr r��s
z1SupervisorNamespaceRPCInterface.getAllProcessInfoc
Cs�|j|�\}}|dkr"ttj|��t|jd|�}|dksHtjj|�rTttj	|��yt
t|t|�t|���St
k
r�}z|jd}	ttt|	���WYdd}~XnXdS)Nz
%s_logfiler)rdrrrQr:rRr4r5r6r7rrr%r8r9)
rrJr;r<�channelrLr`r3r=r>rrr �_readProcessLog�s
z/SupervisorNamespaceRPCInterface._readProcessLogcCs|jd�|j|||d�S)aI Read length bytes from name's stdout log starting at offset

        @param string name        the name of the process (or 'group:name')
        @param int offset         offset to start reading from.
        @param int length         number of bytes to read from the log.
        @return string result     Bytes of log
        �readProcessStdoutLog�stdout)r(r�)rrJr;r<rrr r��s
z4SupervisorNamespaceRPCInterface.readProcessStdoutLogcCs|jd�|j|||d�S)aI Read length bytes from name's stderr log starting at offset

        @param string name        the name of the process (or 'group:name')
        @param int offset         offset to start reading from.
        @param int length         number of bytes to read from the log.
        @return string result     Bytes of log
        �readProcessStderrLog�stderr)r(r�)rrJr;r<rrr r��s
z4SupervisorNamespaceRPCInterface.readProcessStderrLogcCsf|j|�\}}|dkr"ttj|��t|jd|�}|dksHtjj|�rRdddgSt	|t
|�t
|��S)Nz
%s_logfiler�rF)rdrrrQr:rRr4r5r6rr%)rrJr;r<r�rLr`r3rrr �_tailProcessLog�s
z/SupervisorNamespaceRPCInterface._tailProcessLogcCs|jd�|j|||d�S)a�
        Provides a more efficient way to tail the (stdout) log than
        readProcessStdoutLog().  Use readProcessStdoutLog() to read
        chunks and tailProcessStdoutLog() to tail.

        Requests (length) bytes from the (name)'s log, starting at
        (offset).  If the total log size is greater than (offset +
        length), the overflow flag is set and the (offset) is
        automatically increased to position the buffer at the end of
        the log.  If less than (length) bytes are available, the
        maximum number of available bytes will be returned.  (offset)
        returned is always the last offset in the log +1.

        @param string name         the name of the process (or 'group:name')
        @param int offset          offset to start reading from
        @param int length          maximum number of bytes to return
        @return array result       [string bytes, int offset, bool overflow]
        �tailProcessStdoutLogr�)r(r�)rrJr;r<rrr r��s
z4SupervisorNamespaceRPCInterface.tailProcessStdoutLogcCs|jd�|j|||d�S)a�
        Provides a more efficient way to tail the (stderr) log than
        readProcessStderrLog().  Use readProcessStderrLog() to read
        chunks and tailProcessStderrLog() to tail.

        Requests (length) bytes from the (name)'s log, starting at
        (offset).  If the total log size is greater than (offset +
        length), the overflow flag is set and the (offset) is
        automatically increased to position the buffer at the end of
        the log.  If less than (length) bytes are available, the
        maximum number of available bytes will be returned.  (offset)
        returned is always the last offset in the log +1.

        @param string name         the name of the process (or 'group:name')
        @param int offset          offset to start reading from
        @param int length          maximum number of bytes to return
        @return array result       [string bytes, int offset, bool overflow]
        �tailProcessStderrLogr�)r(r�)rrJr;r<rrr r�
s
z4SupervisorNamespaceRPCInterface.tailProcessStderrLogcCsb|jd�|j|�\}}|dkr,ttj|��y|j�Wn$ttfk
r\ttj|��YnXdS)z� Clear the stdout and stderr logs for the named process and
        reopen them.

        @param string name   The name of the process (or 'group:name')
        @return boolean result      Always True unless error
        �clearProcessLogsNT)	r(rdrrrQZ
removelogsrCrBrD)rrJrLr`rrr r� s
z0SupervisorNamespaceRPCInterface.clearProcessLogscs\|jd�g�g�|j�}x"|D]\}}�j|||jf�q W��fdd�}d|_||_|S)zm Clear all process log files

        @return array result   An array of process status info structs
        �clearAllProcessLogscs��s�S�jd�\}}}t|jj|jj�}y||�WnBtk
rx}z&�j|jj|jj|j|jd��WYdd}~Xn X�j|jj|jjtj	dd���r�t
S�S)Nr)rJrL�statusr��OK)�poprrRrJrrZ�coder'r�SUCCESSr)rLr`�callbackrJ�e)�	callbacks�resultsrr �clearallFs(
zESupervisorNamespaceRPCInterface.clearAllProcessLogs.<locals>.clearallg�������?)r(rbrZ�clearProcessLogrlrm)rr]rLr`r�r)r�r�r r�8s
z3SupervisorNamespaceRPCInterface.clearAllProcessLogscCs�|jd�t|tttf�s&ttj|��t|�}|j	|�\}}|dkrPttj
|��|js^|jrjttj
|��y|j|�WnBtk
r�}z&|jdtjkr�ttj|��n�WYdd}~XnXdS)a� Send a string of chars to the stdin of the process name.
        If non-7-bit data is sent (unicode), it is encoded to utf-8
        before being sent to the process' stdin.  If chars is not a
        string or is not unicode, raise INCORRECT_PARAMETERS.  If the
        process is not running, raise NOT_RUNNING.  If the process'
        stdin cannot accept input (e.g. it was closed by the child
        process), raise NO_FILE.

        @param string name        The process name to send to (or 'group:name')
        @param string chars       The character data to send to the process
        @return boolean result    Always return True unless error
        �sendProcessStdinNrT)r(r"�str�bytesrrrZINCORRECT_PARAMETERSrrdrQr�Zkillingrw�writerBr9�errnoZEPIPEr7)rrJ�charsrLr`r>rrr r�es 
z0SupervisorNamespaceRPCInterface.sendProcessStdincCs:t|t�r|jd�}t|t�r(|jd�}tt||��dS)aB Send an event that will be received by event listener
        subprocesses subscribing to the RemoteCommunicationEvent.

        @param  string  type  String for the "type" key in the event header
        @param  string  data  Data for the event body
        @return boolean       Always return True unless error
        zutf-8T)r"r�encoderr)r�typer0rrr �sendRemoteCommEvent�s



z3SupervisorNamespaceRPCInterface.sendRemoteCommEventN)F)T)T)T)T)T)T)0�__name__�
__module__�__qualname__r!r(r)Z
getVersionr+r,r-r1r2ZreadMainLogr?rGrHrIrOrTrbrdrerjrtrurvr{r|r~r�r�r�r�r�r�r�r�ZreadProcessLogr�r�r�ZtailProcessLogr�r�r�r�r�r�rrrr r/sZ	


N


3


/.
-&rcCs|jd|jd|jdS)Ni�Q�
r�i@Bi@B)ZdaysZsecondsZmicroseconds)r�rrr r��sr�cKs"g}g}||||||fdd�}|S)zl Return a closure representing a function that calls a
    function for every process, and returns a result cSs�|s�x�|D]�\}}t|jj|jj�}||�r
y||f|�}	WnDtk
r�}
z(|j|jj|jj|
j|
jd��w
WYdd}
~
XnXt|	tj	�r�|j|||	f�q
|j|jj|jjt
jdd��q
W|s�|Sx�|dd�D]�}|\}}}y
|�}
WnNtk
�r>}
z0|j|jj|jj|
j|
jd��|j|�WYdd}
~
Xq�X|
t
k	r�|j|jj|jjt
jdd��|j|�q�W|�r~t
S|S)N)rJrLr�r�r�)rrRrJrrZr�r'r"�types�FunctionTyperr�rAr)rY�	predicate�func�extra_kwargsr�r�rLr`rJr�r��struct�cb�valuerrr �allfunc�sT	



zmake_allfunc.<locals>.allfuncr)rYr�r�r�r�r�r�rrr rq�sKrqcCs|j�tkS)N)rhr)r`rrr ry�srycCs
t|�S)N)ry)r`rrr rr�srrcCs|j�tkrdSdS)NT)rhr)r`rrr rsrcCst|�S)N)r)rrrr �make_main_rpcinterfacesr�).r4r�r�r�r�Zsupervisor.compatrrrZsupervisor.datatypesrrZsupervisor.optionsrrr	r
rrr
rZsupervisor.eventsrrZsupervisor.httprZsupervisor.xmlrpcrrrZsupervisor.statesrrrrrrrr*rr�rqryrrrr�rrrr �<module>sNuZ