Message370392
| Author |
corona10 |
| Recipients |
JelleZijlstra, benjamin.peterson, corona10, remi.lapeyre, serhiy.storchaka, stutzbach, vstinner |
| Date |
2020年05月30日.17:16:57 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1590859017.66.0.0262641507265.issue40826@roundup.psfhosted.org> |
| In-reply-to |
| Content |
FYI this change fix this issue.
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -1782,7 +1782,11 @@ PyOS_FiniInterrupts(void)
int
PyOS_InterruptOccurred(void)
{
- PyInterpreterState *interp = _PyInterpreterState_GET();
+ PyThreadState *tstate = _PyThreadState_GET();
+ if (!tstate) {
+ return 0;
+ }
+ PyInterpreterState *interp = tstate->interp;
if (!_Py_ThreadCanHandleSignals(interp)) {
return 0;
} |
|