diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-12-21 02:21:07 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-12-21 02:21:07 +0000 |
commit | 9a87a03192b86493f81d9051a4ecf5a698a703fb (patch) | |
tree | 3aea01497ba96f2222cf64200e6dbde0cce30709 | |
parent | 4c1e457fd243287534d970ac3de6709b0a4eb518 (diff) | |
download | portage-9a87a03192b86493f81d9051a4ecf5a698a703fb.tar.gz portage-9a87a03192b86493f81d9051a4ecf5a698a703fb.tar.bz2 portage-9a87a03192b86493f81d9051a4ecf5a698a703fb.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. (trunk r9018)
svn path=/main/branches/2.1.2/; revision=9019
-rw-r--r-- | pym/portage_exec.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage_exec.py b/pym/portage_exec.py index 3a53661bb..dd8217dc3 100644 --- a/pym/portage_exec.py +++ b/pym/portage_exec.py @@ -181,7 +181,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 = [] |