When spawing the "depend" phase, use file descriptors from sys.std*
authorZac Medico <zmedico@gentoo.org>
Fri, 11 Jan 2008 05:37:37 +0000 (05:37 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 11 Jan 2008 05:37:37 +0000 (05:37 -0000)
streams. (trunk r9157)

svn path=/main/branches/2.1.2/; revision=9169

pym/portage.py

index d83cd6e0e52ce5d4dfabdcb99adb8d890ffe52ec..60ac5aa9e22b68910592361365b1c3e97ea5b5f9 100644 (file)
@@ -4376,7 +4376,11 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
                        if isinstance(dbkey, dict):
                                mysettings["dbkey"] = ""
                                pr, pw = os.pipe()
-                               fd_pipes = {0:0, 1:1, 2:2, 9:pw}
+                               fd_pipes = {
+                                       0:sys.stdin.fileno(),
+                                       1:sys.stdout.fileno(),
+                                       2:sys.stderr.fileno(),
+                                       9:pw}
                                mypids = spawn(_shell_quote(ebuild_sh_binary) + " depend",
                                        mysettings,
                                        fd_pipes=fd_pipes, returnpid=True, droppriv=droppriv)