mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-38644: Pass tstate explicitly in signalmodule.c (GH-19184)
PyOS_InterruptOccurred() now checks _Py_ThreadCanHandleSignals() before checking if SIGINT is tripped.
This commit is contained in:
parent
08faf0016e
commit
728189884e
3 changed files with 96 additions and 68 deletions
|
@ -597,8 +597,8 @@ handle_signals(PyThreadState *tstate)
|
|||
}
|
||||
|
||||
UNSIGNAL_PENDING_SIGNALS(tstate);
|
||||
if (_PyErr_CheckSignals() < 0) {
|
||||
/* We're not done yet */
|
||||
if (_PyErr_CheckSignalsTstate(tstate) < 0) {
|
||||
/* On failure, re-schedule a call to handle_signals(). */
|
||||
SIGNAL_PENDING_SIGNALS(tstate);
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue