summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-03-26 21:28:11 (GMT)
committerGitHub <noreply@github.com>2020-03-26 21:28:11 (GMT)
commit728189884e0e128c4ffc57b785b04584d57a90c0 (patch)
tree4060b7e3260bc8ff4fdbec68f8a11d7e70b05f19 /Python
parent08faf0016e1ee590c78f64ddb244767c7801866a (diff)
downloadcpython-728189884e0e128c4ffc57b785b04584d57a90c0.zip
cpython-728189884e0e128c4ffc57b785b04584d57a90c0.tar.gz
cpython-728189884e0e128c4ffc57b785b04584d57a90c0.tar.bz2
bpo-38644: Pass tstate explicitly in signalmodule.c (GH-19184)
PyOS_InterruptOccurred() now checks _Py_ThreadCanHandleSignals() before checking if SIGINT is tripped.
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index afaa6ff..2be02a1 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -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;
}