| Server IP : 121.121.20.254 / Your IP : 216.73.217.51 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python312/Lib/test/__pycache__/ |
Upload File : |
�
���g�H � �. � d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl
Z
ddlZddlZddl
Z
ddlmZ ddlmZ ddlmZ dZej( d� � Z e
j, eed� d � G d
� de
j0 � � Z e
j, eed� d � G d� d
e� � Z e
j, eed� d � G d� de� � Z e
j, eed� d � G d� de� � Z e
j, eed� d � e
j, eed� d� G d� de� � � Z e
j, eed� d � G d� de� � Z G d� de� Ze dk( r e
jB � yy)a�
This test suite exercises some system calls subject to interruption with EINTR,
to check that it is actually handled transparently.
It is intended to be run by the main test suite within a child process, to
ensure there is no background thread running (so that signals are delivered to
the correct thread).
Signals are generated in-process using setitimer(ITIMER_REAL), which allows
sub-second periodicity (contrarily to signal()).
� N)�support)� os_helper)�
socket_helperg{�G�z�?c # �r K � | 5 | �� ddd� y# | j � � xY w# 1 sw Y yxY w�w)zGContext manager killing the subprocess if a Python exception is raised.N)�kill)�procs �%C:\Python312\\Lib\test\_test_eintr.py�
kill_on_errorr
# s6 � �� �
� ��J�
��� ��I�I�K���
��s �7�+�� 7�(�+�4�7� setitimerzrequires setitimer()c �J � e Zd ZdZdZdZdZd� Zd� Ze d� � Z
d� Zd� Zd � Z
y
)�
EINTRBaseTestz Base class for EINTR tests. g�������?g�������?c �. � | xj dz
c_ y �N� )�signals)�self�signum�frames r �
sighandlerzEINTRBaseTest.sighandler: s � ������� c �6 � d| _ t j t j | j � | _ t j
t j | j | j � t j ddt j �� y )Nr iX T)�exit�file)
r �signal�SIGALRMr �orig_handlerr �ITIMER_REAL�signal_delay�
signal_period�faulthandler�dump_traceback_later�sys�
__stderr__�r s r �setUpzEINTRBaseTest.setUp= sf � ����"�M�M�&�.�.�$�/�/�J�������+�+�T�->�->��+�+� -�
�)�)�'��/2�~�~� ?r c �N � t j t j dd� y �Nr )r r r � r r �
stop_alarmzEINTRBaseTest.stop_alarmH s � �����+�+�Q��2r c � � | j � t j t j | j � t j
� y �N)r) r r r r �cancel_dump_traceback_laterr$ s r �tearDownzEINTRBaseTest.tearDownL s0 � ������
�
�f�n�n�d�&7�&7�8��0�0�2r c �X � t j df|z }t j |fi |��S )Nz-c)r"