Sha256: 75edd95454a7bc8cb7dfdfee02e129262ab2fed67441a44dee7a7d6fda1d3b4f

Contents?: true

Size: 493 Bytes

Versions: 5

Compression:

Stored size: 493 Bytes

Contents

module Methadone
  module ExecutionStrategy
    # ExecutionStrategy for non-modern Rubies that must rely on
    # Open4 to get access to the standard output AND error.
    class Open_4 < MRI
      def run_command(command)
        pid, stdin_io, stdout_io, stderr_io = Open4::popen4(command)
        stdin_io.close
        stdout = stdout_io.read
        stderr = stderr_io.read
        _ , status = Process::waitpid2(pid)
        [stdout.chomp,stderr.chomp,status]
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
methadone-1.0.0.rc5 lib/methadone/execution_strategy/open_4.rb
methadone-1.0.0.rc4 lib/methadone/execution_strategy/open_4.rb
methadone-1.0.0.rc3 lib/methadone/execution_strategy/open_4.rb
methadone-1.0.0.rc2 lib/methadone/execution_strategy/open_4.rb
methadone-1.0.0.rc1 lib/methadone/execution_strategy/open_4.rb