summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/SpawnProcess.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/_emerge/SpawnProcess.py')
-rw-r--r--pym/_emerge/SpawnProcess.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/pym/_emerge/SpawnProcess.py b/pym/_emerge/SpawnProcess.py
index 1486e6773..67fb17e29 100644
--- a/pym/_emerge/SpawnProcess.py
+++ b/pym/_emerge/SpawnProcess.py
@@ -49,7 +49,6 @@ class SpawnProcess(SubProcess):
if fd == sys.stderr.fileno():
sys.stderr.flush()
- logfile = self.logfile
self._files = self._files_dict()
files = self._files
@@ -57,6 +56,10 @@ class SpawnProcess(SubProcess):
fcntl.fcntl(master_fd, fcntl.F_SETFL,
fcntl.fcntl(master_fd, fcntl.F_GETFL) | os.O_NONBLOCK)
+ logfile = None
+ if self._can_log(slave_fd):
+ logfile = self.logfile
+
null_input = None
fd_pipes_orig = fd_pipes.copy()
if self.background:
@@ -125,6 +128,9 @@ class SpawnProcess(SubProcess):
self.pid = retval[0]
portage.process.spawned_pids.remove(self.pid)
+ def _can_log(self, slave_fd):
+ return True
+
def _pipe(self, fd_pipes):
"""
@type fd_pipes: dict