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.10/test/__pycache__/win_console_handler.cpython-310.pyc
o

�i��@s�dZddlmZmZddlZddlZddlZddlZeejej�Z	dd�Z
e	e
�Zejj
jZe	ejfe_eje_edkrZeed�sIed�ed	�e�d	dejd�Zded<		qXdS)
aYScript used to test os.kill on Windows, for issue #1220212

This script is started as a subprocess in test_os and is used to test the
CTRL_C_EVENT and CTRL_BREAK_EVENT signals, which requires a custom handler
to be written into the kill target.

See http://msdn.microsoft.com/en-us/library/ms685049%28v=VS.85%29.aspx for a
similar example in C.
�)�wintypes�WINFUNCTYPENcCs,|tjkr	dS|tjkr	dStd�dS)z8Handle a sig event and return 0 to terminate the processz
UNKNOWN EVENTr)�signalZCTRL_C_EVENTZCTRL_BREAK_EVENT�print)�sig�r�5/usr/local/lib/python3.10/test/win_console_handler.py�
_ctrl_handlers

��r	�__main__�z#Unable to add SetConsoleCtrlHandler���)�__doc__ZctypesrrrZmmap�sysZBOOLZDWORDZHandlerRoutiner	Zctrl_handlerZwindllZkernel32ZSetConsoleCtrlHandler�argtypesZrestype�__name__r�exit�argv�mrrrr�<module>s,



��