]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40826: Add _PyOS_InterruptOccurred(tstate) function (GH-20599)
authorVictor Stinner <vstinner@python.org>
Wed, 3 Jun 2020 12:39:59 +0000 (14:39 +0200)
committerGitHub <noreply@github.com>
Wed, 3 Jun 2020 12:39:59 +0000 (14:39 +0200)
commitfa7ab6aa0f9a4f695e5525db5a113cd21fa93787
treedb9c9a9fc6908662ed752d6617a719cc566f155f
parent18a90248fdd92b27098cc4db773686a2d10a4d24
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.
Include/internal/pycore_pystate.h
Lib/test/test_repl.py
Misc/NEWS.d/next/Core and Builtins/2020-06-01-20-31-07.bpo-40826.XCI4M2.rst
Modules/signalmodule.c
Parser/myreadline.c