# File lib/chef/shell_out/windows.rb, line 33
      def run_command
        # win32 open4 is really just open3.
        Open3.popen3(@command) do |stdin,stdout,stderr|
          @finished_stdout = false
          @finished_stderr = false
          stdin.close
          stdout.sync = true
          stderr.sync = true

          # TBH, I really don't know what this will do when it times out.
          # However, I'm powerless to make windows have non-blocking IO, so
          # thread party it is.
          Timeout.timeout(timeout) do
            out_reader = Thread.new do
              loop do
                read_stdout(stdout)
                break if @finished_stdout
              end
            end
            err_reader = Thread.new do
              loop do
                read_stderr(stderr)
                break if @finished_stderr
              end
            end

            out_reader.join
            err_reader.join

            @status = $?
          end
        end

        self

      rescue Timeout::Error
        raise Chef::Exceptions::CommandTimeout, "command timed out:\n#{format_for_exception}"
      end