Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd0a9bc5

Browse files
gh-100649: Update native_thread_id after fork (gh-100650)
Update native_thread_id after fork(cherry picked from commitd52d494)Co-authored-by: Gabriele N. Tornetta <P403n1x87@users.noreply.github.com>
1 parent7ed7127 commitd0a9bc5

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update the native_thread_id field of PyThreadState after fork.

‎Modules/posixmodule.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,10 @@ PyOS_AfterFork_Child(void)
591591
PyThreadState*tstate=_PyThreadState_GET();
592592
_Py_EnsureTstateNotNULL(tstate);
593593

594+
#ifdefPY_HAVE_THREAD_NATIVE_ID
595+
tstate->native_thread_id=PyThread_get_thread_native_id();
596+
#endif
597+
594598
status=_PyEval_ReInitThreads(tstate);
595599
if (_PyStatus_EXCEPTION(status)) {
596600
gotofatal_error;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp