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 sxsns243
Recipients Andre Merzky, minrk, neologix, sxsns243, takluyver, vstinner
Date 2016-12-09.03:05:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Recently I've encountered the similar problem.
I found the case that SIGINT signal is ignored(set as SIG_IGN) due to the external reason.
If the python program starts background in bash script, bash set SIGINT as SIG_IGN.
import _thread
python &
sleep 1s

Traceback (most recent call last):
  File "", line 2, in <module>
RuntimeError: the SIGINT signal is ignored
(it was TypeError: 'int' object is not callable before the patch)

Python mapped default_int_handler to SIG_INT on SIG_DFL in PyInit__signal.
As the python developer can't control how the program is started, it may be better to setup default_int_handler regardless the handler type.

And initially SIG_INT is mapped to default_int_handler but once signal.signal is called, the mapping is lost even though the SIG_DFL is specified.
It may need to handle SIG_INT specially in signal_signal_impl as well to keep the consistent behavior.
Date User Action Args
2016-12-09 03:05:34sxsns243setrecipients: + sxsns243, vstinner, neologix, takluyver, minrk, Andre Merzky
2016-12-09 03:05:34sxsns243setmessageid: <>
2016-12-09 03:05:34sxsns243linkissue23395 messages
2016-12-09 03:05:33sxsns243create