summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorJean-Paul Calderone <exarkun@divmod.com>2010-05-08 20:06:02 (GMT)
committerJean-Paul Calderone <exarkun@divmod.com>2010-05-08 20:06:02 (GMT)
commite54ddf1ed2ec9f4166e51a392afeaa857a56d5c3 (patch)
tree1702e4bbab8f31338c919fa32ae24c157569d927 /Python
parent0712b5651a67de5ba3bb9dafa243e6a5b0a80846 (diff)
downloadcpython-e54ddf1ed2ec9f4166e51a392afeaa857a56d5c3.zip
cpython-e54ddf1ed2ec9f4166e51a392afeaa857a56d5c3.tar.gz
cpython-e54ddf1ed2ec9f4166e51a392afeaa857a56d5c3.tar.bz2
Skip signal handler re-installation if it is not necessary. Issue 8354.
Diffstat (limited to 'Python')
-rw-r--r--Python/pythonrun.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 8294b91..71a53ea 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -1862,6 +1862,10 @@ PyOS_sighandler_t
PyOS_setsig(int sig, PyOS_sighandler_t handler)
{
#ifdef HAVE_SIGACTION
+ /* Some code in Modules/signalmodule.c depends on sigaction() being
+ * used here if HAVE_SIGACTION is defined. Fix that if this code
+ * changes to invalidate that assumption.
+ */
struct sigaction context, ocontext;
context.sa_handler = handler;
sigemptyset(&context.sa_mask);