Sha256: a57089c73e5db131f5939809a8d8f3e96b9200f6ea36793718c7d026d473bcf8
Contents?: true
Size: 472 Bytes
Versions: 37
Compression:
Stored size: 472 Bytes
Contents
require 'open4' # # when using block form the child process is automatically waited using # waitpid2 # status = Open4::popen4("sh") do |pid, stdin, stdout, stderr| stdin.puts "echo 42.out" stdin.puts "echo 42.err 1>&2" stdin.close puts "pid : #{ pid }" puts "stdout : #{ stdout.read.strip }" puts "stderr : #{ stderr.read.strip }" end puts "status : #{ status.inspect }" puts "exitstatus : #{ status.exitstatus }"
Version data entries
37 entries across 37 versions & 4 rubygems