vagrant/lib
Jake Teton-Landis ceb69e6266 Allow closing a Vagrant::Util::Subprocess's STDIN
Previously, there was no way to close the STDIN stream of a subprocess,
so commands that read from stdin in a subprocess would hang forever,
such as `/bin/sh -s`. If one tried to close the stdin, the
IO.select() call in Subprocess#execute would raise an error for calling
select() on a closed IO.

Here's a concrete example of a command that needs to close STDIN to work
properly:

```ruby
script = SOME_VERY_LONG_STRING
command = %w(ssh foo.example.com /bin/sh -s foo bar)
result = ::Vagrant::Util::Subprocess.execute(*command) do |type, data_or_io|
  if type == :stdin
    data_or_io.write(script)
    data_or_io.write("\n")
    data_or_io.close
    next
  end

  puts "Remote: #{data_or_io}"
end
```
2016-09-04 16:45:38 -07:00
..
vagrant Allow closing a Vagrant::Util::Subprocess's STDIN 2016-09-04 16:45:38 -07:00
vagrant.rb for newer versions of Bundler, store the runtime 2015-07-09 22:12:47 -06:00