(proc, data)
| 311 | ) |
| 312 | |
| 313 | async def write_stdin(proc, data): |
| 314 | proc.stdin.write(data) |
| 315 | # Only exit the child process once the write buffer is filled |
| 316 | os.write(wfd, b'go') |
| 317 | await proc.stdin.drain() |
| 318 | |
| 319 | coro = write_stdin(proc, large_data) |
| 320 | # drain() must raise BrokenPipeError or ConnectionResetError |