summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-06-03 12:39:59 (GMT)
committerGitHub <noreply@github.com>2020-06-03 12:39:59 (GMT)
commitfa7ab6aa0f9a4f695e5525db5a113cd21fa93787 (patch)
treedb9c9a9fc6908662ed752d6617a719cc566f155f /Misc
parent18a90248fdd92b27098cc4db773686a2d10a4d24 (diff)
downloadcpython-fa7ab6aa0f9a4f695e5525db5a113cd21fa93787.zip
cpython-fa7ab6aa0f9a4f695e5525db5a113cd21fa93787.tar.gz
cpython-fa7ab6aa0f9a4f695e5525db5a113cd21fa93787.tar.bz2
bpo-40826: Add _PyOS_InterruptOccurred(tstate) function (GH-20599)
my_fgets() now calls _PyOS_InterruptOccurred(tstate) to check for pending signals, rather calling PyOS_InterruptOccurred(). my_fgets() is called with the GIL released, whereas PyOS_InterruptOccurred() must be called with the GIL held. test_repl: use text=True and avoid SuppressCrashReport in test_multiline_string_parsing(). Fix my_fgets() on Windows: fgets(fp) does crash if fileno(fp) is closed.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2020-06-01-20-31-07.bpo-40826.XCI4M2.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-06-01-20-31-07.bpo-40826.XCI4M2.rst b/Misc/NEWS.d/next/Core and Builtins/2020-06-01-20-31-07.bpo-40826.XCI4M2.rst
index f79f20d..a03ed18 100644
--- a/Misc/NEWS.d/next/Core and Builtins/2020-06-01-20-31-07.bpo-40826.XCI4M2.rst
+++ b/Misc/NEWS.d/next/Core and Builtins/2020-06-01-20-31-07.bpo-40826.XCI4M2.rst
@@ -1 +1,2 @@
-Fix GIL usage in :c:func:`PyOS_Readline`: lock the GIL to set an exception.
+Fix GIL usage in :c:func:`PyOS_Readline`: lock the GIL to set an exception
+and pass the Python thread state when checking if there is a pending signal.