From 36f43fa676e220ab36e0e47dbcf0ead49bb0410c Mon Sep 17 00:00:00 2001 From: Joe Kutner Date: Sat, 4 Feb 2012 09:28:36 -0600 Subject: [PATCH] moved the closing of subprocess streams to after the process has finished. --- lib/vagrant/util/subprocess.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/vagrant/util/subprocess.rb b/lib/vagrant/util/subprocess.rb index cc29c4e75..8778133ed 100644 --- a/lib/vagrant/util/subprocess.rb +++ b/lib/vagrant/util/subprocess.rb @@ -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}")