Charles-Francois Natali <neolo...@free.fr> added the comment: Attached are two patches: - test_signal_siginterrupt.diff is a patch for Lib/test/test_signal.py to check for this problem (more than one signal received after calling signal.siginterrupt()) before: $ ./python Lib/test/regrtest.py test_signal test_signal 1 test OK.
after: $ ./python Lib/test/regrtest.py test_signal test_signal test test_signal failed -- Traceback (most recent call last): File "/home/cf/python/trunk/Lib/test/test_signal.py", line 299, in test_siginterrupt_off self.assertEquals(i, False) AssertionError: True != False 1 test failed: test_signal - 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/regrtest.py test_signal test_signal 1 test OK. Of course, this also corrects the problem with sig-test.py, the terminal can be resized indefinitely. I also passed test_subprocess and test_socketserver just to be sure, but reviews are more than welcome. ---------- keywords: +patch Added file: http://bugs.python.org/file16847/test_signal_siginterrupt.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8354> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com