Sha256: 491408b8d7a7a3a5684e75c9014cdc489c737bdf73004ee5f0655d01a061fb92

Contents?: true

Size: 653 Bytes

Versions: 26

Compression:

Stored size: 653 Bytes

Contents

module Methadone
  module ExecutionStrategy
    # <b>Methadone Internal - treat as private</b>
    #
    # 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 =
          case command
          when String then Open4::popen4(command)
          else Open4::popen4(*command)
          end
        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

26 entries across 26 versions & 2 rubygems

Version Path
methadone-2.0.2 lib/methadone/execution_strategy/open_4.rb
methadone-2.0.1 lib/methadone/execution_strategy/open_4.rb
methadone-2.0.0 lib/methadone/execution_strategy/open_4.rb
methadone-1.9.5 lib/methadone/execution_strategy/open_4.rb
methadone-1.9.4 lib/methadone/execution_strategy/open_4.rb
methadone-1.9.3 lib/methadone/execution_strategy/open_4.rb
methadone-1.9.2 lib/methadone/execution_strategy/open_4.rb
methadone-rehab-1.9.2 lib/methadone/execution_strategy/open_4.rb
methadone-1.9.1 lib/methadone/execution_strategy/open_4.rb
methadone-1.9.0 lib/methadone/execution_strategy/open_4.rb
methadone-1.8.0 lib/methadone/execution_strategy/open_4.rb
methadone-1.7.0 lib/methadone/execution_strategy/open_4.rb
methadone-1.6.0 lib/methadone/execution_strategy/open_4.rb
methadone-1.5.1 lib/methadone/execution_strategy/open_4.rb
methadone-1.5.0 lib/methadone/execution_strategy/open_4.rb
methadone-1.4.0 lib/methadone/execution_strategy/open_4.rb
methadone-1.3.2 lib/methadone/execution_strategy/open_4.rb
methadone-1.3.1 lib/methadone/execution_strategy/open_4.rb
methadone-1.3.0 lib/methadone/execution_strategy/open_4.rb
methadone-1.2.6 lib/methadone/execution_strategy/open_4.rb