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 | e54ddf1ed2ec9f4166e51a392afeaa857a56d5c3 (patch) | |
tree | 1702e4bbab8f31338c919fa32ae24c157569d927 /Modules/signalmodule.c | |
parent | 0712b5651a67de5ba3bb9dafa243e6a5b0a80846 (diff) | |
download | cpython-git-e54ddf1ed2ec9f4166e51a392afeaa857a56d5c3.tar.gz |
Skip signal handler re-installation if it is not necessary. Issue 8354.
Diffstat (limited to 'Modules/signalmodule.c')
-rw-r--r-- | Modules/signalmodule.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c index bb7e4b0dcb..b1ee890bc5 100644 --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -198,7 +198,12 @@ signal_handler(int sig_num) return; } #endif +#ifndef HAVE_SIGACTION + /* If the handler was not set up with sigaction, reinstall it. See + * Python/pythonrun.c for the implementation of PyOS_setsig which + * makes this true. See also issue8354. */ PyOS_setsig(sig_num, signal_handler); +#endif } |