Break out of loop on EOF in asyncio echo test programs.

This commit is contained in:
Guido van Rossum 2013-10-19 21:26:34 -07:00
parent 0acceb7697
commit d49c47bfb0
2 changed files with 4 additions and 0 deletions

View file

@ -3,4 +3,6 @@ import os
if __name__ == '__main__':
while True:
buf = os.read(0, 1024)
if not buf:
break
os.write(1, buf)