diff options
author | Thomas Moreau <thomas.moreau.2010@gmail.com> | 2019-05-20 19:37:05 (GMT) |
---|---|---|
committer | Antoine Pitrou <antoine@python.org> | 2019-05-20 19:37:05 (GMT) |
commit | c09a9f56c08d80567454cae6f78f738a89e1ae94 (patch) | |
tree | 7f00233cfa994ba74ca952d371ae85651690602a /Lib/multiprocessing/forkserver.py | |
parent | 5ae1c84bcd13b766989fc3f1e1c851e7bd4c1faa (diff) | |
download | cpython-c09a9f56c08d80567454cae6f78f738a89e1ae94.zip cpython-c09a9f56c08d80567454cae6f78f738a89e1ae94.tar.gz cpython-c09a9f56c08d80567454cae6f78f738a89e1ae94.tar.bz2 |
bpo-36888: Add multiprocessing.parent_process() (GH-13247)
Diffstat (limited to 'Lib/multiprocessing/forkserver.py')
-rw-r--r-- | Lib/multiprocessing/forkserver.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/multiprocessing/forkserver.py b/Lib/multiprocessing/forkserver.py index dabf7bc..9b63986 100644 --- a/Lib/multiprocessing/forkserver.py +++ b/Lib/multiprocessing/forkserver.py @@ -294,7 +294,8 @@ def _serve_one(child_r, fds, unused_fds, handlers): *_forkserver._inherited_fds) = fds # Run process object received over pipe - code = spawn._main(child_r) + parent_sentinel = os.dup(child_r) + code = spawn._main(child_r, parent_sentinel) return code |