Copy term size to pty only if foreground.
authorZac Medico <zmedico@gentoo.org>
Sat, 23 Oct 2010 20:46:37 +0000 (13:46 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 23 Oct 2010 20:46:37 +0000 (13:46 -0700)
pym/_emerge/AbstractEbuildProcess.py
pym/_emerge/EbuildFetcher.py

index b99f1df8a3a9e2e2131d6960d9b9d538788bbf19..46c8f938f7fd89ed4004ae46fad8b2f2871afb9c 100644 (file)
@@ -164,7 +164,9 @@ class AbstractEbuildProcess(SpawnProcess):
                self._eerror(textwrap.wrap(msg, 72))
 
        def _pipe(self, fd_pipes):
-               stdout_pipe = fd_pipes.get(1)
+               stdout_pipe = None
+               if not self.background:
+                       stdout_pipe = fd_pipes.get(1)
                got_pty, master_fd, slave_fd = \
                        _create_pty_or_pipe(copy_term_size=stdout_pipe)
                return (master_fd, slave_fd)
index 141dc69eabb044e4d286f9b6aa794614e2e8d890..96f295f3bf8dab59780b9a73c6d7865b141fc198 100644 (file)
@@ -156,7 +156,9 @@ class EbuildFetcher(SpawnProcess):
                        # When the output only goes to a log file,
                        # there's no point in creating a pty.
                        return os.pipe()
-               stdout_pipe = fd_pipes.get(1)
+               stdout_pipe = None
+               if not self.background:
+                       stdout_pipe = fd_pipes.get(1)
                got_pty, master_fd, slave_fd = \
                        _create_pty_or_pipe(copy_term_size=stdout_pipe)
                return (master_fd, slave_fd)