HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.7/test/__pycache__/signalinterproctester.cpython-37.pyc
B

��g�
�@sfddlZddlZddlZddlZddlZddlZGdd�de�ZGdd�dej�Z	e
dkrbe��dS)�Nc@seZdZdS)�SIGUSR1ExceptionN)�__name__�
__module__�__qualname__�rr�6/usr/local/lib/python3.7/test/signalinterproctester.pyr	src@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�InterProcessSignalTestscCsdddd�|_dS)Nr)�SIGHUP�SIGUSR1�SIGALRM)�got_signals)�selfrrr�setUpszInterProcessSignalTests.setUpcCs|jdd7<dS)Nr	�)r)r
�signum�framerrr�sighup_handlersz&InterProcessSignalTests.sighup_handlercCs|jdd7<t�dS)Nr
r)rr)r
rrrrr�sigusr1_handlersz'InterProcessSignalTests.sigusr1_handlercCs^|dk	r|��d}t��|}x&t��|krF|j|r<dSt��q"W|�d||f�dS)Ng$@z'signal %s not received after %s seconds)�wait�timeZ	monotonicr�signal�pauseZfail)r
�child�signameZtimeoutZdeadlinerrr�wait_signals
z#InterProcessSignalTests.wait_signalcCs$d||f}tjdd|g}t�|�S)Nz)import os, signal; os.kill(%s, signal.%s)z-Iz-c)�sys�
executable�
subprocess�Popen)r
�pidr�code�argsrrr�subprocess_send_signal)sz.InterProcessSignalTests.subprocess_send_signalc
CsNt�tj|j�t�tj|j�t�tjtj�t�tjtj�t	t
���}|�|d��}|�
|d�WdQRX|�|jdddd��|�t��*|�|d��}|�
|d�WdQRXWdQRX|�|jdddd��|�|d��}|��WdQRXzF|�t��t�d�|�
dd�WdQRX|�|jdddd��Wdt�d�XdS)Nr	rr)r	r
rr
�SIGUSR2r)rr	rr
rr#�SIG_IGNr�default_int_handler�str�os�getpidr"rZassertEqualrZassertRaisesrr�KeyboardInterrupt�alarm)r
rrrrr�test_interprocess_signal.s.
 

z0InterProcessSignalTests.test_interprocess_signalN)	rrrrrrrr"r+rrrrr
sr�__main__)r'rrrrZunittest�	ExceptionrZTestCaserr�mainrrrr�<module>sE