diff --git a/CHANGES b/CHANGES index 5d2e1a344..b2d053b0e 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,8 @@ Here you can find the recent changes to libtmux current ------- +- :issue:`251`: Enchance subprocess interaction std[in|out|err]. Needed + for interact with big buffer - :issue:`303` Add ``common.get_libtmux_version`` which gives the tmux version as a loose constraint. Fix linking to terms inside docs, and duplicate description of module which sphinx warned about in api.rst. diff --git a/libtmux/common.py b/libtmux/common.py index 4df50ec4d..4874745dd 100644 --- a/libtmux/common.py +++ b/libtmux/common.py @@ -205,11 +205,7 @@ def __init__(self, *args, **kwargs): self.process = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE ) - self.process.wait() - stdout = self.process.stdout.read() - self.process.stdout.close() - stderr = self.process.stderr.read() - self.process.stderr.close() + stdout, stderr = self.process.communicate() returncode = self.process.returncode except Exception as e: logger.error('Exception for %s: \n%s' % (subprocess.list2cmdline(cmd), e))