Commit 82b33c38 by Abhijit Menon-Sen Committed by James Cammarata

We don't need even a token timeout here; just poll once

The process is already gone, so there's not going to be any new data
showing up on its stderr; we only want to make sure that we haven't
missed something that was already written. So polling once is enough.
parent 6e82df45
......@@ -542,11 +542,13 @@ class Connection(ConnectionBase):
# When ssh has ControlMaster (+ControlPath/Persist) enabled, the
# first connection goes into the background and we never see EOF
# on stderr. If we see EOF on stdout and the process has exited,
# we're done. Just to be extra sure that we aren't missing any
# output on stderr, we call select again with a small timeout.
# we're probably done. We call select again with a zero timeout,
# just to make certain we don't miss anything that may have been
# written to stderr between the time we called select() and when
# we learned that the process had finished.
if not p.stdout in rpipes:
timeout = 0.001
timeout = 0
continue
# If the process has not yet exited, but we've already read EOF from
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment