HEX
Server: nginx/1.24.0
System: Linux localhost 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64
User: www (1000)
PHP: 8.3.27
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: //usr/lib/python3/dist-packages/cloudinit/__pycache__/signal_handler.cpython-310.pyc
o

쑛h��@s�UddlZddlZddlZddlZddlZddlmZddlmZm	Z	m
Z
mZddlm
ZddlmZe�e�ZdZe
ed<dZe
ed	<ejd
ejdejdiZe
e	eefed
<deeedfddfdd�Zdd�Zdd�Zdd�Z dS)�N)�StringIO)�Callable�Dict�Final�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�SIGNALS�sig�returncCs�t|�rt|tj�st�d|�dSdS|tjkr t�d�dS|dur+t�d�dS|tjkr8t�d|�dSt�	dt
|�|�dS)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)r
�r�:/usr/lib/python3/dist-packages/cloudinit/signal_handler.py�inspect_handlers�

�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
�)�inspect�getframeinfo�write�filename�function�lineno�
_pprint_frame�f_back)�frame�depth�	max_depth�contents�
frame_info�prefixrrrr&5s
r&cCsht|tj�r	|jn|}tt�t��|��}t	|dt
|�tjd|�d�|�
�ttjd�t�d�dS)NrzReceived signal z resulting in exit. Cause:
)�log�	log_levelr)rr�Signals�namerr	�format�vr�version_stringr&rr�	multi_log�getvaluer�logging�INFO�sys�exit)�signumr(r1r+rrr�_handle_exit@s
��r<cCs2d}t��D]
}tt�|t��q|tt�7}|S)zattach cloud-init's handlersr)r�keysrrr<�len)�
sigs_attachedr;rrr�attach_handlersNs
r@)!r r7rr9r�ior�typingrrrr�	cloudinitrr3�
cloudinit.logr�	getLogger�__name__rr	�__annotations__r�SIGINT�SIGTERM�SIGABRTr�int�strrr&r<r@rrrr�<module>s(

�