| 57 | self._loop.create_task(self._connect_pipes(waiter)) |
| 58 | |
| 59 | def __repr__(self): |
| 60 | info = [self.__class__.__name__] |
| 61 | if self._closed: |
| 62 | info.append('closed') |
| 63 | if self._pid is not None: |
| 64 | info.append(f'pid={self._pid}') |
| 65 | if self._returncode is not None: |
| 66 | info.append(f'returncode={self._returncode}') |
| 67 | elif self._pid is not None: |
| 68 | info.append('running') |
| 69 | else: |
| 70 | info.append('not started') |
| 71 | |
| 72 | stdin = self._pipes.get(0) |
| 73 | if stdin is not None: |
| 74 | info.append(f'stdin={stdin.pipe}') |
| 75 | |
| 76 | stdout = self._pipes.get(1) |
| 77 | stderr = self._pipes.get(2) |
| 78 | if stdout is not None and stderr is stdout: |
| 79 | info.append(f'stdout=stderr={stdout.pipe}') |
| 80 | else: |
| 81 | if stdout is not None: |
| 82 | info.append(f'stdout={stdout.pipe}') |
| 83 | if stderr is not None: |
| 84 | info.append(f'stderr={stderr.pipe}') |
| 85 | |
| 86 | return '<{}>'.format(' '.join(info)) |
| 87 | |
| 88 | def _start(self, args, shell, stdin, stdout, stderr, bufsize, **kwargs): |
| 89 | raise NotImplementedError |