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. --- bin/dispatch-conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/dispatch-conf') diff --git a/bin/dispatch-conf b/bin/dispatch-conf index e5f768056..479647ede 100755 --- a/bin/dispatch-conf +++ b/bin/dispatch-conf @@ -462,7 +462,7 @@ def spawn_shell(cmd): sys.__stdout__.flush() sys.__stderr__.flush() spawn([shell, "-c", cmd], env=os.environ, - fd_pipes = { 0 : sys.__stdin__.fileno(), + fd_pipes = { 0 : portage._get_stdin().fileno(), 1 : sys.__stdout__.fileno(), 2 : sys.__stderr__.fileno()}) else: -- cgit v1.2.3-1-g7c22