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.

classification
Title: forkserver not reused in child processes
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: cchomey
Priority: normal Keywords:

Created on 2020-10-29 00:40 by cchomey, last changed 2022-04-11 14:59 by admin.

Files
File name Uploaded Description Edit
test.py cchomey, 2020-10-29 23:36
Messages (1)
msg379851 - (view) Author: Colin (cchomey) Date: 2020-10-29 00:40
The docstring on Forkserver.ensure_running states that a child process will use the forkserver process started by its parent:

"""
Make sure that a fork server is running.

This can be called from any process.  Note that usually a child
process will just reuse the forkserver started by its parent, so
ensure_running() will do nothing.
"""

Link to definition: https://github.com/python/cpython/blob/master/Lib/multiprocessing/forkserver.py#L105

That is not the behavior that I am seeing, however. I'm seeing each child (that start a process itself) will first spawn a *new* forkserver.
History
Date User Action Args
2022-04-11 14:59:37adminsetgithub: 86354
2020-10-29 23:36:31cchomeysetfiles: + test.py
2020-10-29 23:36:23cchomeysetfiles: - test.py
2020-10-29 00:40:06cchomeycreate