Staging
v0.8.1
https://github.com/python/cpython
Revision c6b20be85c0de6f2355c67ae6e7e578941275cc0 authored by Jake Tesler on 19 November 2019, 19:50:12 UTC, committed by Miss Islington (bot) on 19 November 2019, 19:50:12 UTC


This PR implements a fix for `multiprocessing.Process` objects; the error occurs when Processes are created using either `fork` or `forkserver` as the `start_method`.

In these instances, the `MainThread` of the newly created `Process` object retains all attributes from its parent's `MainThread` object, including the `native_id` attribute. The resulting behavior is such that the new process' `MainThread` captures an incorrect/outdated `native_id` (the parent's instead of its own). 

This change forces the Process object to update its `native_id` attribute during the bootstrap process.

cc @vstinner





https://bugs.python.org/issue38707



Automerge-Triggered-By: @pitrou
1 parent 892221b
History
Tip revision: c6b20be85c0de6f2355c67ae6e7e578941275cc0 authored by Jake Tesler on 19 November 2019, 19:50:12 UTC
bpo-38707: Fix for multiprocessing.Process MainThread.native_id (GH-17088)
Tip revision: c6b20be
File Mode Size
.azure-pipelines
.github
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Programs
Python
Tools
m4
.gitattributes -rw-r--r-- 1.8 KB
.gitignore -rw-r--r-- 1.8 KB
.travis.yml -rw-r--r-- 8.1 KB
CODE_OF_CONDUCT.md -rw-r--r-- 630 bytes
LICENSE -rw-r--r-- 12.5 KB
Makefile.pre.in -rw-r--r-- 66.2 KB
README.rst -rw-r--r-- 9.8 KB
aclocal.m4 -rw-r--r-- 10.7 KB
config.guess -rwxr-xr-x 43.1 KB
config.sub -rwxr-xr-x 35.4 KB
configure -rwxr-xr-x 492.2 KB
configure.ac -rw-r--r-- 162.7 KB
install-sh -rwxr-xr-x 15.0 KB
netlify.toml -rw-r--r-- 82 bytes
pyconfig.h.in -rw-r--r-- 44.0 KB
setup.py -rw-r--r-- 101.7 KB

README.rst

back to top