(proc, data)
| 342 | ) |
| 343 | |
| 344 | async def write_stdin(proc, data): |
| 345 | proc.stdin.write(data) |
| 346 | # Only exit the child process once the write buffer is filled |
| 347 | os.write(wfd, b'go') |
| 348 | await proc.stdin.drain() |
| 349 | |
| 350 | coro = write_stdin(proc, large_data) |
| 351 | # drain() must raise BrokenPipeError or ConnectionResetError |