Skip signal handler re-installation if it is not necessary. Issue 8354.

This commit is contained in:
Jean-Paul Calderone 2010-05-08 20:06:02 +00:00
parent 0712b5651a
commit e54ddf1ed2
4 changed files with 86 additions and 17 deletions

View file

@ -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
}