From: Zac Medico Date: Tue, 13 Dec 2011 17:27:38 +0000 (-0800) Subject: AbstractEbuildProcess: null in if not interactive X-Git-Tag: v2.2.0_alpha81~18 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a3797a63a30579be3ba5418aad7e76fd520f9aee;p=portage.git AbstractEbuildProcess: null in if not interactive --- diff --git a/pym/_emerge/AbstractEbuildProcess.py b/pym/_emerge/AbstractEbuildProcess.py index 4147ecb7b..6e1491bbe 100644 --- a/pym/_emerge/AbstractEbuildProcess.py +++ b/pym/_emerge/AbstractEbuildProcess.py @@ -92,7 +92,19 @@ class AbstractEbuildProcess(SpawnProcess): else: self.settings.pop('PORTAGE_EBUILD_EXIT_FILE', None) - SpawnProcess._start(self) + if self.fd_pipes is None: + self.fd_pipes = {} + null_fd = None + if 0 not in self.fd_pipes and \ + "interactive" not in self.settings.get("PROPERTIES", "").split(): + null_fd = os.open('/dev/null', os.O_RDONLY) + self.fd_pipes[0] = null_fd + + try: + SpawnProcess._start(self) + finally: + if null_fd is not None: + os.close(null_fd) def _init_ipc_fifos(self):