diff options
author | Zac Medico <zmedico@gentoo.org> | 2020-07-02 16:51:41 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2020-07-18 21:35:23 -0700 |
commit | bde44b75407dfe0a390033636894a136af4e7533 (patch) | |
tree | f96e8e66d26826866b229cf82cbbe44d7d99d40b /setup.py | |
parent | AsyncFunction: stdin support (diff) | |
download | portage-bde44b75407dfe0a390033636894a136af4e7533.tar.gz portage-bde44b75407dfe0a390033636894a136af4e7533.tar.bz2 portage-bde44b75407dfe0a390033636894a136af4e7533.zip |
ForkProcess: replace os.fork with multiprocessing.Process (bug 730192)
Replace os.fork with multiprocessing.Process, in order to leverage
any pre-fork and post-fork interpreter housekeeping that it provides,
promoting a healthy state for the forked interpreter.
Since multiprocessing.Process closes sys.__stdin__, fix relevant
code to use the portage._get_stdin() compatibility function.
In case there's a legitimate need to inherit stdin for things like
PROPERTIES=interactive support, create a temporary duplicate of
fd_pipes[0] when appropriate, and restore sys.stdin and sys.__stdin__
in the subprocess.
Bug: https://bugs.gentoo.org/730192
Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'setup.py')
0 files changed, 0 insertions, 0 deletions