bpo-36888: Add multiprocessing.parent_process() (GH-13247)

This commit is contained in:
Thomas Moreau 2019-05-20 21:37:05 +02:00 committed by Antoine Pitrou
parent 5ae1c84bcd
commit c09a9f56c0
12 changed files with 155 additions and 20 deletions

View file

@ -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