This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Michael.Felt
Recipients Michael.Felt, shihai1991, vstinner
Date 2021-04-01.11:20:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
OK. Please explain. Looking at tstate assignment

In posixmodule.c:PyOSAfterFork_Child()
    PyStatus status;
    _PyRuntimeState *runtime = &_PyRuntime;

    PyThreadState *tstate = _PyThreadState_GET();

and later calls
    status = _PyRuntimeState_ReInitThreads(runtime);

Yet in Posix/ceval.c
_PyEval_ReInitThreads(PyThreadState *tstate)
    _PyRuntimeState *runtime = tstate->interp->runtime;

** this looks like runtime->interp->runtime

And then we get down to:
    /* Destroy all threads except the current one */
    _PyThreadState_DeleteExcept(runtime, tstate);

Is this correct - as it looks like:
_PyThreadState_DeleteExcept(runtime->interp->runtime, runtime) -- where runtime == &_PyRuntime;
Date User Action Args
2021-04-01 11:20:55Michael.Feltsetrecipients: + Michael.Felt, vstinner, shihai1991
2021-04-01 11:20:55Michael.Feltsetmessageid: <>
2021-04-01 11:20:55Michael.Feltlinkissue40092 messages
2021-04-01 11:20:55Michael.Feltcreate