From 0db4c2a0f8b80b3f08a9a1f068a8cd0b2ff1fe4f Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 15 Dec 2012 14:04:28 -0800 Subject: Handle closed sys.__stdin__, for multiprocessing Buggy code in python's multiprocessing/process.py closes sys.stdin and reassigns it to open(os.devnull), but fails to update the corresponding __stdin__ reference. So, detect that case and handle it appropriately. The buggy code is visible in http://hg.python.org/lookup/r73708. --- pym/portage/process.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pym/portage/process.py') diff --git a/pym/portage/process.py b/pym/portage/process.py index fbfbde049..63c315423 100644 --- a/pym/portage/process.py +++ b/pym/portage/process.py @@ -226,7 +226,7 @@ def spawn(mycommand, env={}, opt_name=None, fd_pipes=None, returnpid=False, # default to propagating our stdin, stdout and stderr. if fd_pipes is None: fd_pipes = { - 0:sys.__stdin__.fileno(), + 0:portage._get_stdin().fileno(), 1:sys.__stdout__.fileno(), 2:sys.__stderr__.fileno(), } -- cgit v1.2.3-1-g7c22