[issue30654] signal module always overwrites SIGINT on interpreter shutdown

STINNER Victor report at bugs.python.org
Fri Jun 1 06:08:56 EDT 2018


STINNER Victor <vstinner at redhat.com> added the comment:

> You have it backwards.  Please read the bug report.

I'm confused by the NEWS entry:

+Fixed reset of the SIGINT handler to SIG_DFL on interpreter shutdown even
+when there was a custom handler set previously. Patch by Philipp Kerling.

I read it as Python now always reset SIGINT to SIG_DFL. The commit title is more explicit: "Do not reset SIGINT (...)".

I propose to rephrase the NEWS entry as:

"""
Fix signal handlers when Python is embedded. On Python shutdown, do not reset the SIGINT handler to SIG_DFL, when a custom handler has been set before Python initialization. Patch by Philipp Kerling.
"""

--

Ok, now I understood the change. In this case, I'm ok to backport it to 3.6 and 3.7.

Python 2.7 has this behavior since 10 years, it seems like people learnt to live with it. I also dislike touching Python 2.7, to prevent any risk of regression if someone really rely on the current behavior.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30654>
_______________________________________


More information about the Python-bugs-list mailing list