diff options
Diffstat (limited to 'Python/ceval.c')
| -rw-r--r-- | Python/ceval.c | 9 | 
1 files changed, 8 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 03456f6..439f4f1 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -379,9 +379,16 @@ handle_signals(void)      {          return 0;      } +    /* +     * Ensure that the thread isn't currently running some other +     * interpreter. +     */ +    if (_PyInterpreterState_GET_UNSAFE() != _PyRuntime.interpreters.main) { +        return 0; +    }      UNSIGNAL_PENDING_SIGNALS(); -    if (PyErr_CheckSignals() < 0) { +    if (_PyErr_CheckSignals() < 0) {          SIGNAL_PENDING_SIGNALS(); /* We're not done yet */          return -1;      }  | 
