mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
gh-100649: Update native_thread_id after fork (gh-100650)
Update native_thread_id after fork
This commit is contained in:
parent
e83f88a455
commit
d52d4942cf
2 changed files with 5 additions and 0 deletions
|
|
@ -595,6 +595,10 @@ PyOS_AfterFork_Child(void)
|
|||
PyThreadState *tstate = _PyThreadState_GET();
|
||||
_Py_EnsureTstateNotNULL(tstate);
|
||||
|
||||
#ifdef PY_HAVE_THREAD_NATIVE_ID
|
||||
tstate->native_thread_id = PyThread_get_thread_native_id();
|
||||
#endif
|
||||
|
||||
status = _PyEval_ReInitThreads(tstate);
|
||||
if (_PyStatus_EXCEPTION(status)) {
|
||||
goto fatal_error;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue