Support for pipes. #3

Connects pipes on the listener child process the same way they are connected on the initiator--any combination of stdin, stdout, and stderr could be connected to a pipe. Any one of those not connected to a pipe will be connected to a pty.
This commit is contained in:
Aaron Heise 2023-02-16 00:16:04 -06:00
parent 27664df0b3
commit ebdcb50265
4 changed files with 262 additions and 97 deletions

View file

@ -37,7 +37,11 @@ class SubprocessReader(contextlib.AbstractContextManager):
env=self.env,
loop=self.loop,
stdout_callback=self._stdout_cb,
terminated_callback=self._terminated_cb)
terminated_callback=self._terminated_cb,
stderr_callback=self._stdout_cb,
stdin_is_pipe=False,
stdout_is_pipe=False,
stderr_is_pipe=False)
def _stdout_cb(self, data):
self._log.debug(f"_stdout_cb({data})")