diff options
author | Jean-Paul Calderone <exarkun@divmod.com> | 2010-05-08 20:06:02 +0000 |
---|---|---|
committer | Jean-Paul Calderone <exarkun@divmod.com> | 2010-05-08 20:06:02 +0000 |
commit | fe1ae000863977032430ff5ce6173b6b0337f164 (patch) | |
tree | b2b87c7fee08408f3277522ca0e2cf1f8f521640 /Python | |
parent | 7f1ffb209b5fd92fce9f3d06cf051f4882a0ad1d (diff) | |
download | cpython-fe1ae000863977032430ff5ce6173b6b0337f164.tar.gz |
Skip signal handler re-installation if it is not necessary. Issue 8354.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pythonrun.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 8294b91b5f..71a53ea88c 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); |