[pypy-issue] [issue1167] signal.getsignal (check_signum) unnecessarily strict on pypy versus cpython
Marien Zwart
tracker at bugs.pypy.org
Mon Jun 11 13:29:02 CEST 2012
New submission from Marien Zwart <marien.zwart at gmail.com>:
In cpython and older (<=1.8) pypy the check if a number is a valid signal number
is just a range check against 1 and NSIG. In recent (>=1.9) pypy it's a check
against a set of signal numbers that have a corresponding signal name. This
breaks the following code from Twisted 12.1.0 (_resetSignalDisposition in
process.py):
{{{
for signalnum in range(1, signal.NSIG):
if signal.getsignal(signalnum) == signal.SIG_IGN:
# Reset signal handling to the default
signal.signal(signalnum, signal.SIG_DFL)
}}}
Unless there is a reason for the check to be this strict that I am overlooking
it would be nice to revert back to the cpython-compatible check here.
----------
messages: 4411
nosy: marienz, pypy-issue
priority: bug
release: 1.9
status: unread
title: signal.getsignal (check_signum) unnecessarily strict on pypy versus cpython
________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1167>
________________________________________
More information about the pypy-issue
mailing list