class VagrantRunner
  attr_reader :vagrant_dir

  def initialize(vagrant_dir)
    @vagrant_dir = vagrant_dir
  end

  def start_benchmark
    ssh_command(Rails.application.config.vm_start_runner)
  end

  def start_postprocessing
    ssh_command(Rails.application.config.vm_start_postprocessing)
  end

  def ssh_command(executable)
    %x( cd "#{@vagrant_dir}" &&
        vagrant ssh -- "cd '#{Rails.application.config.vm_benchmark_dir}' &&
                        nohup './#{executable}' > /dev/null 2>> '#{Rails.application.config.vm_error_log_file}' < /dev/null &" )
    $?.success?
  end
end

class VagrantRunner
  attr_reader :vagrant_dir

  def initialize(vagrant_dir)
    @vagrant_dir = vagrant_dir
  end

  def start_benchmark
    ssh_command(Rails.application.config.vm_start_runner)
  end

  def start_postprocessing
    ssh_command(Rails.application.config.vm_start_postprocessing)
  end

  def ssh_command(executable)
    %x( cd "#{@vagrant_dir}" &&
        vagrant ssh -- "cd '#{Rails.application.config.vm_benchmark_dir}' &&
                        nohup './#{executable}' >/dev/null 2>>'#{Rails.application.config.vm_error_log_file}' </dev/null &" )
    $?.success?
  end
end

Fix blocking remote ssh command
Fix blocking remote ssh command
