403Webshell
Server IP : 46.62.235.243  /  Your IP : 216.73.216.217
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux Linkabili3Dicembre 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.1.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/supervisor/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/supervisor/__pycache__/supervisord.cpython-312.pyc
�

���f�8����dZddlZddlZddlZddlmZddlmZddl	m
Z
ddl	mZddl	mZddl
mZdd	lmZdd
lmZGd�d�Zd
�Zd�Zdd�Zd�Zedk(re�yy)a�supervisord -- run a set of applications as daemons.

Usage: %s [options]

Options:
-c/--configuration FILENAME -- configuration file path (searches if not given)
-n/--nodaemon -- run in the foreground (same as 'nodaemon=true' in config file)
-s/--silent -- no logs to stdout (maps to 'silent=true' in config file)
-h/--help -- print this usage message and exit
-v/--version -- print supervisord version number and exit
-u/--user USER -- run supervisord as this user (or numeric uid)
-m/--umask UMASK -- use this umask for daemon subprocess (default is 022)
-d/--directory DIRECTORY -- directory to chdir to when daemonized
-l/--logfile FILENAME -- use FILENAME as logfile path
-y/--logfile_maxbytes BYTES -- use BYTES to limit the max size of logfile
-z/--logfile_backups NUM -- number of backups to keep when max bytes reached
-e/--loglevel LEVEL -- use LEVEL as log level (debug,info,warn,error,critical)
-j/--pidfile FILENAME -- write a pid file for the daemon process to FILENAME
-i/--identifier STR -- identifier used for this instance of supervisord
-q/--childlogdir DIRECTORY -- the log directory for child process logs
-k/--nocleanup --  prevent the process from performing cleanup (removal of
                   old automatic child log files) at startup.
-a/--minfds NUM -- the minimum number of file descriptors for start success
-t/--strip_ansi -- strip ansi escape codes from process output
--minprocs NUM  -- the minimum number of processes available for start success
--profile_options OPTIONS -- run supervisord under profiler and output
                             results based on OPTIONS, which  is a comma-sep'd
                             list of 'cumulative', 'calls', and/or 'callers',
                             e.g. 'cumulative,callers')
�N)�asyncore_25)�	as_string)�
ServerOptions)�decode_wait_status)�signame)�events)�SupervisorStates)�getProcessStateDescriptionc�z�eZdZdZdZdZdZd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zdd�Zdd�Zd�Zd�Zy)�
SupervisorFrNc�.�||_i|_i|_y�N)�options�process_groups�ticks)�selfrs  �8/usr/lib/python3/dist-packages/supervisor/supervisord.py�__init__zSupervisor.__init__6s����� �����
�c��|jjs|jj�|jj�|jjr|jj	�|jj�|jjs|jj�|j�yr)	r�first�cleanup_fds�set_uid_or_exit�set_rlimits_or_exit�make_logger�	nocleanup�clear_autochildlogdir�run�rs r�mainzSupervisor.main;s����|�|�!�!�
�L�L�$�$�&����$�$�&��<�<����L�L�,�,�.�	
��� � �"��|�|�%�%��L�L�.�.�0����
rc�^�i|_d|_tj�	|jj
D]}|j
|��|jj|�|jj�|jjs0|jjr|jj�|jj�|j�|jj�y#|jj�wxYwr)r�stop_groupsr�clearr�process_group_configs�add_process_group�openhttpservers�
setsignals�nodaemonr�	daemonize�
write_pidfile�
runforever�cleanup)r�configs  rrzSupervisor.runPs��� ����������	#��,�,�<�<�
/���&�&�v�.�
/��L�L�(�(��.��L�L�#�#�%��L�L�)�)�t�|�|�/A�/A����&�&�(�
�L�L�&�&�(��O�O���L�L� � �"��D�L�L� � �"�s�CD�D,c�^�|jj}|jj�D�cgc]}|j��}}tt
|D�cgc]}|j��c}|��}tt
|D�cgc]}|j��c}|��}|D�cgc]}|j|vs�|��}}|D�cgc]}|j|vs�|��}	}|D�cgc]#}||j|j|�k7r|��%}
}||
|	fScc}wcc}wcc}wcc}wcc}wcc}wr)	rr$r�valuesr-�dict�zip�name�get)r�new�group�cur�cfg�curdict�newdict�cand�added�removed�changeds           r�diff_to_activezSupervisor.diff_to_activebs���l�l�0�0��)-�)<�)<�)C�)C�)E�F��u�|�|�F��F��s��4��C�H�H�4�c�:�;���s��4��C�H�H�4�c�:�;��$'�D�D�4�9�9�G�+C�4�D��D�$'�D�D�4�9�9�G�+C�4�D��D�$'�<�D��g�k�k�$�)�)�T�:�:��<��<��g�w�&�&��G��4��4��D��D��<s/�D�D�D�&D �:D �D%�D%�"(D*c���|j}||jvrV|j�|j�|j|<t	j
t	j|��yy)NTF)r2r�after_setuid�
make_groupr�notify�ProcessGroupAddedEvent)rr-r2s   rr%zSupervisor.add_process_groupqs[���{�{���t�*�*�*����!�(.�(9�(9�(;�D����%��M�M�&�7�7��=�>��rc���|j|j�ry|j|j�|j|=tjtj
|��y)NFT)r�get_unstopped_processes�
before_removerrB�ProcessGroupRemovedEvent)rr2s  r�remove_process_groupzSupervisor.remove_process_groupzs[�����t�$�<�<�>�����D�!�/�/�1�����%��
�
�f�5�5�d�;�<�rc��i}|jj�D]!}|j|j���#|Sr)rr/�update�get_dispatchers)r�process_mapr5s   r�get_process_mapzSupervisor.get_process_map�sB�����(�(�/�/�1�	8�E����u�4�4�6�7�	8��rc�t�g}|jj�D]!}|j|j���#|r�t	j�}||j
dzkDr�|D�cgc]!}t
|jj���#}}dj|�}|jjjd|z�||_|D]Y}t|j��}|jjj|jj�d|����[|Scc}w)N�z, zwaiting for %s to diez state: )rr/�extendrE�time�lastshutdownreportrr-r2�joinr�logger�infor
�	get_state�blather)	r�	unstoppedr5�now�p�names�namestr�proc�states	         r�shutdown_reportzSupervisor.shutdown_report�s���	��(�(�/�/�1�	>�E����U�:�:�<�=�	>���)�)�+�C��d�-�-��1�2�<E�G�q�)�A�H�H�M�M�2�G��G��)�)�E�*�����#�#�(�(�)@�7�)J�K�*-��'�%�D�D�6�t�~�~�7G�H�E��L�L�'�'�/�/�*.�+�+�*:�*:�E�B�D�D����Hs�-&D5c�X�|jr|jdj�yy)N���)r"�stop_allrs r�ordered_stop_groups_phase_1z&Supervisor.ordered_stop_groups_phase_1�s'��������R� �)�)�+�rc��|jrG|jj�}|j�r|jj|�yyyr)r"�poprE�append)rr5s  r�ordered_stop_groups_phase_2z&Supervisor.ordered_stop_groups_phase_2�sM������$�$�(�(�*�E��,�,�.�
� � �'�'��.�/�rc��tjtj��d}|jj	�}	i}|j|�|j|j
��t|jj��}|j�|jjtjkrt|js8d|_|dd|_tjtj ��|j#�|j%�st&j(�|j+�D]p\}}|j-�r%|jj.j1|�|j3�s�L|jj.j5|��r|jj.j7|�\}}|D]y}||vs�	||}|jj8j;d|��|j=�|j-�s%|jj.j?|��{|D]y}||vs�	||}|jj8j;d|��|jC�|j3�s%|jj.jE|��{|D]}	|	jG��|jI�|jK�|jM�|jjtjkr|jO�|jjPry��>#t&j($r�||jA�Y���xYw#t&j($r�||jA�Y��lxYw)N�Tz#read event caused by %(dispatcher)r)�
dispatcherz$write event caused by %(dispatcher)r))rrB�SupervisorRunningEventr�get_socket_maprJrM�listrr/�sort�moodr	�RUNNING�stoppingr"�SupervisorStoppingEventrcr_�asyncore�ExitNow�items�readable�poller�register_readable�writable�register_writable�pollrTrW�handle_read_event�unregister_readable�handle_error�handle_write_event�unregister_writable�
transition�reap�
handle_signal�tickrg�test)
r�timeout�
socket_map�combined_map�pgroups�fdrj�r�wr5s
          rr+zSupervisor.runforever�s9���
�
�f�3�3�5�6����\�\�0�0�2�
���L����
�+����� 4� 4� 6�7��4�.�.�5�5�7�8�G��L�L�N��|�|� � �#3�#;�#;�;��}�}�%)�D�M�'.�q�z�D�$��M�M�&�"@�"@�"B�C��0�0�2��+�+�-�#�*�*�*�".�"4�"4�"6�
>���J��&�&�(��L�L�'�'�9�9�"�=��&�&�(��L�L�'�'�9�9�"�=�	
>��<�<�&�&�+�+�G�4�D�A�q��

8����%�8�%1�"�%5�
����+�+�3�3�A�'1�4�3�#�4�4�6�)�2�2�4� �L�L�/�/�C�C�B�G��

8��

8����%�8�%1�"�%5�
����+�+�3�3�B�'1�4�3�#�5�5�7�)�2�2�4� �L�L�/�/�C�C�B�G��

8�!�
#��� � �"�
#�
�I�I�K���� ��I�I�K��|�|� � �#3�#;�#;�;��0�0�2��|�|� � ��Q��R$�+�+���8�$�R�(�5�5�7��$�+�+���8�$�R�(�5�5�7�s�;A1N�9A1N1�(N.�1(Oc�\�|�tj�}tjD]�}|j}|jj|�}|�t
||�x}|j|<t
||�}||k7s�Y||j|<tj|||����y)zo Send one or more 'tick' events when the timeslice related to
        the period for the event type rolls over N)rQr�TICK_EVENTS�periodrr3�	timeslicerB)rrY�eventr��	last_tick�	this_ticks      rr�zSupervisor.tick�s����;��)�)�+�C��'�'�		6�E��\�\�F��
�
���v�.�I�� �1:�6�3�1G�G�	�D�J�J�v�.�!�&�#�.�I��I�%�%.��
�
�6�"��
�
�e�I�t�4�5�		6rc��|dk(ry|jj�\}}|r�|jjj|d�}|�;t	|�\}}|jj
j
d|�d|�d��n)|j||�|jj|=|s|jd|dz��yyy)N�dzreaped unknown pid z (�)Fri)�once�recursionguard)	r�waitpid�
pidhistoryr3rrTrU�finishr�)rr�r��pid�sts�process�_�msgs        rr�zSupervisor.reaps����S� ���<�<�'�'�)���S���l�l�-�-�1�1�#�t�<�G���+�C�0���3����#�#�(�(��c�)R�S����s�C�(��L�L�+�+�C�0���	�	�u�^�A�5E�	�F��rc���|jj�}|�rD|tjtjtj
fvrQ|jjjdt|�z�tj|j_y|tjk(r�|jjtjk(r2|jjjdt|�z�y|jjjdt|�z�tj|j_y|tjk(r2|jjjdt|�z�y|tj k(r{|jjj#dt|�z�|jj%�|j&j)�D]}|j%��y|jjj+dt|�z�yy)Nz#received %s indicating exit requestz<ignored %s indicating restart request (shutdown in progress)z&received %s indicating restart requestz#received %s indicating a child quitz)received %s indicating log reopen requestzreceived %s indicating nothing)r�
get_signal�signal�SIGTERM�SIGINT�SIGQUITrT�warnrr	�SHUTDOWNro�SIGHUP�
RESTARTING�SIGCHLD�debug�SIGUSR2rU�
reopenlogsrr/rW)r�sigr5s   rr�zSupervisor.handle_signal s����l�l�%�%�'����v�~�~�v�}�}�f�n�n�E�E����#�#�(�(�9�G�C�L�H�J�$4�$=�$=����!���
�
�%��<�<�$�$�(8�(A�(A�A��L�L�'�'�,�,�V�Y`�ad�Ye�e�g��L�L�'�'�,�,�@�7�3�<�O�Q�(8�(C�(C�D�L�L�%�����&����#�#�)�)�9�G�C�L�H�J�����&����#�#�(�(�?�'�#�,�N�P����'�'�)�!�0�0�7�7�9�'�E��$�$�&�'����#�#�+�+�4�w�s�|�C�E�/rc�.�|jjSr)rrors rrVzSupervisor.get_state<s���|�|� � � rr)Fr)�__name__�
__module__�__qualname__rqrRrr"rr rr>r%rHrMr_rcrgr+r�r�r�rV�rrrr0sf���H����N��K��
�*#�$
'�����(,�
/�N�`6�"G�"E�8!rrc�$�t|||zz
�Sr)�int)r��whens  rr�r�?s���t�t�f�}�%�&�&rc��	ddl}ddl}ddl}|j�\}}		|j
||||	�|j|	�}
|
j�|
j|xsd�|r|
jd�n|
jd�tj|	�y#t$rddl}Y��wxYw#tj|	�wxYw)Nr)�
cumulative�callsrQg333333�?)�cProfile�ImportError�profile�pstats�tempfile�mkstemp�runctx�Stats�
strip_dirs�
sort_stats�
print_callers�print_stats�os�remove)�cmd�globals�locals�
sort_order�callersr�r�r�r��fn�statss           rr�r�Cs����"���
�
�
�
�F�B������s�G�V�R�0����R� ��
��������*�G�(G�H������#����b�!�
�	�	�"�
��!����� 	�	�	�"�
�s�B%�A-B8�%
B5�4B5�8Cc��tjdk(sJd��d}	t�}|j|t��||_||_|jr/|j\}}tdt�t�||�nt|�|j�|j�d}|s|jtj kry��)N�posixz)This code makes Unix-specific assumptionsT)�doczgo(options)F)r�r2r�realize�__doc__rr��profile_optionsr�r�r��go�close_httpservers�close_loggerror	r�)�argsr�rrr�r�s      rr r Zs���
�7�7�g��J�J�J���E�
��/������'��*���
�����"�"�")�"9�"9��J���M�7�9�f�h�
�G�L��w�K��!�!�#��������G�L�L�#3�#>�#>�>��rc�n�t|�}	|j�y#tj$rYywxYwr)rr rsrt)r�ds  rr�r�ns2���7��A�
�	��������
��
�s��4�4�__main__)NF)r�r�rQr��supervisor.medusarrs�supervisor.compatr�supervisor.optionsrrr�
supervisorr�supervisor.statesr	r
rr�r�r r�r�r�rr�<module>r�sb���>
��
�5�'�,�1�&��.�8�M!�M!�^'��.�(
��z���F�r

Youez - 2016 - github.com/yon3zu
LinuXploit