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/getbinpkg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pym/portage/getbinpkg.py') diff --git a/pym/portage/getbinpkg.py b/pym/portage/getbinpkg.py index 28b18a00f..947bd3e92 100644 --- a/pym/portage/getbinpkg.py +++ b/pym/portage/getbinpkg.py @@ -499,7 +499,7 @@ def file_get(baseurl,dest,conn=None,fcmd=None,filename=None): myfetch = portage.util.shlex_split(fcmd) myfetch = [varexpand(x, mydict=variables) for x in myfetch] fd_pipes= { - 0:sys.__stdin__.fileno(), + 0:portage._get_stdin().fileno(), 1:sys.__stdout__.fileno(), 2:sys.__stdout__.fileno() } -- cgit v1.2.3-1-g7c22