This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author valgog
Recipients valgog
Date 2010-08-05.18:21:44
SpamBayes Score 1.3194235e-06
Marked as misclassified No
Message-id <1281032507.28.0.881221183962.issue9524@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2010-08-05 18:21:47valgogsetrecipients: + valgog
2010-08-05 18:21:47valgogsetmessageid: <1281032507.28.0.881221183962.issue9524@psf.upfronthosting.co.za>
2010-08-05 18:21:44valgoglinkissue9524 messages
2010-08-05 18:21:44valgogcreate