New submission from Valentine Gogichashvili <val...@gmail.com>: When executing the following code on Windows 7 64-bit ::
import sys import signal import time print 'Version:' print sys.executable or sys.platform, sys.version print print def h(s, f): print s signal.signal(signal.CTRL_BREAK_EVENT, h) we get the following output:: Version: C:\Python27\python.exe 2.7 (r27:82525, Jul 4 2010, 07:43:08) [MSC v.1500 64 bit (AMD64)] Traceback (most recent call last): File "signal_ctrl_break_event.py", line 14, in <module> signal.signal(signal.CTRL_BREAK_EVENT, h) RuntimeError: (0, 'Error') When trying to register a handler for a signal.CTRL_C_EVENT the exception is as follows:: File "signal_ctrl_c_event.py", line 6, in <module> signal.signal(signal.CTRL_C_EVENT, h) ValueError: signal number out of range ---------- components: Library (Lib), Windows messages: 113005 nosy: valgog priority: normal severity: normal status: open title: CTRL_C_EVENT and CTRL_BREAK_EVENT cannot be registered by signal.signal() method on windows type: behavior versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9524> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com