diff --git a/pyvirtualdisplay/abstractdisplay.py b/pyvirtualdisplay/abstractdisplay.py index bed35ed..41e2e75 100644 --- a/pyvirtualdisplay/abstractdisplay.py +++ b/pyvirtualdisplay/abstractdisplay.py @@ -189,15 +189,15 @@ def _popen(self, use_pass_fds): self._subproc = subprocess.Popen( self._command, pass_fds=[self._pipe_wfd], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, shell=False, ) else: self._subproc = subprocess.Popen( self._command, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, shell=False, ) @@ -340,7 +340,6 @@ def _kill_subproc(self): log.debug("exception in kill:%s", oserror) self._subproc.wait() - self._read_stdout_stderr() def stop(self): """ @@ -365,13 +364,6 @@ def stop(self): self._display_to_rm = None return self - def _read_stdout_stderr(self): - if self.stdout is None: - (self.stdout, self.stderr) = self._subproc.communicate() - - log.debug("stdout=%s", self.stdout) - log.debug("stderr=%s", self.stderr) - def _setup_xauth(self): """ Set up the Xauthority file and the XAUTHORITY environment variable. @@ -416,9 +408,6 @@ def is_alive(self): return False # return self.return_code is None rc = self._subproc.poll() - if rc is not None: - # proc exited - self._read_stdout_stderr() return rc is None # @property