moved the closing of subprocess streams to after the process has finished.

This commit is contained in:
Joe Kutner 2012-02-04 09:28:36 -06:00 committed by Mitchell Hashimoto
parent 3ea04f2577
commit 36f43fa676
1 changed files with 4 additions and 4 deletions

View File

@ -64,10 +64,6 @@ module Vagrant
# Make sure the stdin does not buffer
process.io.stdin.sync = true
# Close the writer pipes, since we're just reading
stdout_writer.close
stderr_writer.close
# Create a dictionary to store all the output we see.
io_data = { :stdout => "", :stderr => "" }
@ -120,6 +116,10 @@ module Vagrant
rescue ChildProcess::TimeoutError
raise TimeoutExceeded, process.pid
end
# Close the writer pipes, since we're just reading
stdout_writer.close
stderr_writer.close
@logger.debug("Exit status: #{process.exit_code}")