1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-31 02:00:45 +00:00

ssh: Flush writing end of pipes before closing

When running a background command, ensure the redirection thread flushes
the writing end of the pipe before closing it.
This commit is contained in:
Douglas Raillard 2021-08-18 13:32:34 +01:00 committed by Marc Bonnici
parent 9c8624833e
commit a6dd4ddbce

View File

@ -678,6 +678,7 @@ class SshConnection(SshConnectionBase):
# Make sure the writing end are closed proper since we are not
# going to write anything anymore
for r, w in out_streams.values():
w.flush()
if r is not w and w is not None:
w.close()