HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-10-0-8-47 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:31:58 UTC 2024 aarch64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.22
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/cloudinit/__pycache__/signal_handler.cpython-310.pyc
o

�Ad"�@s�ddlZddlZddlZddlmZddlmZddlmZddlm	Z
e�e�Z
dZejdejdejd	iZd
d�Zdd
�Zdd�ZdS)�N)�StringIO)�log)�util)�version�)z2Cloud-init %(version)s received SIGINT, exiting...�)z3Cloud-init %(version)s received SIGTERM, exiting...r)z3Cloud-init %(version)s received SIGABRT, exiting...rcCsz||ks|sdSt�|�}d|d}|�d||jf�|�d||jf�|�d||jf�t|j|d||�dS)N� �z%sFilename: %s
z%sFunction: %s
z%sLine number: %s
r)�inspect�getframeinfo�write�filename�function�lineno�
_pprint_frame�f_back)�frame�depth�	max_depth�contents�
frame_info�prefix�r�:/usr/lib/python3/dist-packages/cloudinit/signal_handler.pyrs
rcCsbt|\}}|dt��i}t�}|�d|�t|dt|�tj|�	�ddt
d�t�|�dS)Nrz%s
rTF)�console�stderrr)
�EXIT_FOR�vr�version_stringrrr�BACK_FRAME_TRACE_DEPTHr�	multi_log�getvalue�LOG�sys�exit)�signumr�msg�rcrrrr�_handle_exit*sr(cCs.d}t��D]}t�|t�q|tt�7}|S)Nr)r�keys�signalr(�len)�
sigs_attachedr%rrr�attach_handlers4s
r-)r
r*r#�ior�	cloudinitr�loggingrrr�	getLogger�__name__r"r�SIGINT�SIGTERM�SIGABRTrrr(r-rrrr�<module>s 
�