bpo-42350: Fix Thread._reset_internal_locks() (GH-23268)


Fix the threading.Thread class at fork: do nothing if the thread is
already stopped (ex: fork called at Python exit). Previously, an
error was logged in the child process.
(cherry picked from commit 5909a494cd3ba43143b28bd439773ed85a485dfc)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 files changed