Mercurial > cpython-lru_cache-weakref
diff Python/pythonrun.c @ 61441:435a8355dab6 legacy-trunk
Skip signal handler re-installation if it is not necessary. Issue 8354.
| author | Jean-Paul Calderone <exarkun@divmod.com> |
|---|---|
| date | Sat, 08 May 2010 20:06:02 +0000 |
| parents | 95c400b9d74c |
| children | fd25030223b0 |
line wrap: on
line diff
--- a/Python/pythonrun.c Sat May 08 19:13:21 2010 +0000 +++ b/Python/pythonrun.c Sat May 08 20:06:02 2010 +0000 @@ -1862,6 +1862,10 @@ 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);
