mirror of
https://github.com/python/cpython.git
synced 2025-07-27 21:24:32 +00:00
Skip signal handler re-installation if it is not necessary. Issue 8354.
This commit is contained in:
parent
0712b5651a
commit
e54ddf1ed2
4 changed files with 86 additions and 17 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue