mirror of
https://github.com/python/cpython.git
synced 2025-08-28 04:35:02 +00:00
Break out of loop on EOF in asyncio echo test programs.
This commit is contained in:
parent
0acceb7697
commit
d49c47bfb0
2 changed files with 4 additions and 0 deletions
|
@ -3,4 +3,6 @@ import os
|
|||
if __name__ == '__main__':
|
||||
while True:
|
||||
buf = os.read(0, 1024)
|
||||
if not buf:
|
||||
break
|
||||
os.write(1, buf)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue