diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-10-22 03:09:55 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-10-22 06:08:24 -0700 |
commit | 789994012c26fcaa92891c986bd82d132e632d75 (patch) | |
tree | 9e406fc6a08ed375019a318be43f6ccc18076818 /pym/_emerge/EbuildFetcher.py | |
parent | 14f070fb33a1a491756c5377a4db118b22c86280 (diff) | |
download | portage-789994012c26fcaa92891c986bd82d132e632d75.tar.gz portage-789994012c26fcaa92891c986bd82d132e632d75.tar.bz2 portage-789994012c26fcaa92891c986bd82d132e632d75.zip |
EbuildFetcher: close uneeded fds in subprocess
Diffstat (limited to 'pym/_emerge/EbuildFetcher.py')
-rw-r--r-- | pym/_emerge/EbuildFetcher.py | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/pym/_emerge/EbuildFetcher.py b/pym/_emerge/EbuildFetcher.py index 9f48d21f5..7b2cdb948 100644 --- a/pym/_emerge/EbuildFetcher.py +++ b/pym/_emerge/EbuildFetcher.py @@ -85,16 +85,7 @@ class EbuildFetcher(SpawnProcess): portage.process.spawned_pids.append(pid) return [pid] - # Set up the command's pipes. - my_fds = {} - # To protect from cases where direct assignment could - # clobber needed fds ({1:2, 2:1}) we first dupe the fds - # into unused fds. - for fd in fd_pipes: - my_fds[fd] = os.dup(fd_pipes[fd]) - # Then assign them to what they should be. - for fd in my_fds: - os.dup2(my_fds[fd], fd) + portage.process._setup_pipes(fd_pipes) # Force consistent color output, in case we are capturing fetch # output through a normal pipe due to unavailability of ptys. |