summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-12-21 02:15:57 +0000
committerZac Medico <zmedico@gentoo.org>2007-12-21 02:15:57 +0000
commit4c1e457fd243287534d970ac3de6709b0a4eb518 (patch)
treedd0d384e038b83f68741521b79ed2ff5ad79b53b /pym
parent29e5d9911713307e14601e43960b51967928e4c8 (diff)
downloadportage-4c1e457fd243287534d970ac3de6709b0a4eb518.tar.gz
portage-4c1e457fd243287534d970ac3de6709b0a4eb518.tar.bz2
portage-4c1e457fd243287534d970ac3de6709b0a4eb518.zip
In portage.spawn(), make the default fd_pipes value get file
descriptors from sys.std{in,out,err} so that they can be overridden. (trunk r9016) svn path=/main/branches/2.1.2/; revision=9017
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 007991615..29671a5db 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -2737,7 +2737,11 @@ def spawn(mystring, mysettings, debug=0, free=0, droppriv=0, sesandbox=0, fakero
fd_pipes = keywords.get("fd_pipes")
if fd_pipes is None:
- fd_pipes = {0:0, 1:1, 2:2}
+ fd_pipes = {
+ 0:sys.stdin.fileno(),
+ 1:sys.stdout.fileno(),
+ 2:sys.stderr.fileno(),
+ }
# In some cases the above print statements don't flush stdout, so
# it needs to be flushed before allowing a child process to use it
# so that output always shows in the correct order.