def execute_thread tool, options='', prompt=nil, &block
      t = Thread.new do
        Thread.current.abort_on_exception = true
        runner = execute_silent(tool, options)
        Thread.current['runner'] = runner
        out = read_from runner.r, prompt, &block
        err = read_from runner.e, prompt, &block
        out.join && err.kill
      end

      # Wait for the runner to be created
      # before returning a nil reference
      # that never gets populated...
      while t['runner'].nil? do
        sleep(0.1)
      end

      if !t.alive?
        raise Sprout::Errors::UsageError.new(t['runner'].read_err)
      end

      t
    end
def execute_thread tool, options='', prompt=nil, &block
      t = Thread.new do
        Thread.current.abort_on_exception = true
        runner = execute_silent(tool, options)
        Thread.current['runner'] = runner
        out = read_from runner.r, prompt, &block
        err = read_from runner.e, prompt, &block
        out.join && err.kill
      end

      # Wait for the runner to be created
      # before returning a nil reference
      # that never gets populated...
      while t['runner'].nil? do
        sleep(0.1)
      end

      if !t.alive?
        raise Sprout::Errors::UsageError.new(t['runner'].read_err)
      end

      t
    end
Execute a new process in a separate thread and yield whatever output
 is written to its stderr and stdout.

 @return [Sprout::ProcessRunner]
 @param tool [File] Path to the executable.
 @param options [String] The command line options that the executable accepts.
 @param prompt [Regex] The prompt that will trigger the listener block to be called.
 @yield [String] Message that was received from the process, called when #prompt is encountered.