summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-12-21 02:20:30 +0000
committerZac Medico <zmedico@gentoo.org>2007-12-21 02:20:30 +0000
commit593bf4cf9b0b845a23ede31b356e19d15b0a9141 (patch)
tree6dd87f5261a684d9c89328d925fd9a522abf9823
parentf0b59bc706fa993cf467ec2040dd80af0de2930d (diff)
downloadportage-593bf4cf9b0b845a23ede31b356e19d15b0a9141.tar.gz
portage-593bf4cf9b0b845a23ede31b356e19d15b0a9141.tar.bz2
portage-593bf4cf9b0b845a23ede31b356e19d15b0a9141.zip
In portage.process.spawn(), make the default fd_pipes value get
file descriptors from sys.std{in,out,err} so that they can be overridden. svn path=/main/trunk/; revision=9018
-rw-r--r--pym/portage/process.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage/process.py b/pym/portage/process.py
index fcec7588c..e9a1fab70 100644
--- a/pym/portage/process.py
+++ b/pym/portage/process.py
@@ -185,7 +185,11 @@ def spawn(mycommand, env={}, opt_name=None, fd_pipes=None, returnpid=False,
# If we haven't been told what file descriptors to use
# default to propogating our stdin, stdout and stderr.
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(),
+ }
# mypids will hold the pids of all processes created.
mypids = []