From 292a277974fe1223bfa956243ac1a2bde1e20c42 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 22 Oct 2010 03:09:55 -0700 Subject: EbuildFetcher: close uneeded fds in subprocess --- pym/_emerge/EbuildFetcher.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'pym/_emerge') diff --git a/pym/_emerge/EbuildFetcher.py b/pym/_emerge/EbuildFetcher.py index b1a10d900..1abe846d7 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. -- cgit v1.2.3-1-g7c22