tools/qvm-run: fix handling EOF

This commit is contained in:
Marek Marczykowski-Górecki 2017-07-18 01:12:43 +02:00
parent 40a1769806
commit 706cecd60d
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -95,6 +95,8 @@ def copy_stdin(stream):
# multiprocessing.Process have sys.stdin connected to /dev/null
stdin = open(0)
for data in iter(lambda: stdin.buffer.read(4096), b''):
if data is None:
break
stream.write(data)
stream.close()