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 neologix
Recipients exarkun, neologix, spiv
Date 2010-04-09.19:56:16
SpamBayes Score 3.612214e-07
Marked as misclassified No
Message-id <>
Attached are two patches:
- test_signal_siginterrupt.diff is a patch for Lib/test/ to check for this problem (more than one signal received after calling signal.siginterrupt())
$ ./python Lib/test/ test_signal
1 test OK.

$ ./python Lib/test/ test_signal
test test_signal failed -- Traceback (most recent call last):
  File "/home/cf/python/trunk/Lib/test/", line 299, in test_siginterrupt_off
    self.assertEquals(i, False)
AssertionError: True != False

1 test failed:

- signal_noreinstall.diff is a patch against Modules/signalmodule.c which modifies signal_handler() to call PyOS_setsig() only when sigaction is not available, since in that case the signal handler doesn't need to be reinstalled. This solves this problem, and also saves a call to sigaction every time a signal is received (even if its probably doesn't cost much).

with patch and updated test:
$ ./python Lib/test/ test_signal
1 test OK.

Of course, this also corrects the problem with, the terminal can be resized indefinitely.
I also passed test_subprocess and test_socketserver just to be sure, but reviews are more than welcome.
Date User Action Args
2010-04-09 19:56:20neologixsetrecipients: + neologix, spiv, exarkun
2010-04-09 19:56:19neologixsetmessageid: <>
2010-04-09 19:56:16neologixlinkissue8354 messages
2010-04-09 19:56:16neologixcreate