Sha256: 3f3d566a459f2c8c420510ef00c74f88f72075c865e916951585b2eae8401bf0
Contents?: true
Size: 387 Bytes
Versions: 13
Compression:
Stored size: 387 Bytes
Contents
require 'open3' # popen3 without deadlock version # almost same with what capture3 does cmd_array = ['./cat_64k.rb'] stdin, out, err, wait_thr = Open3.popen3(*cmd_array) out_reader = Thread.new { out.read } err_reader = Thread.new { err.read } stdin.close pid = wait_thr.pid stdout = out_reader.value stderr = err_reader.value exit_code = wait_thr.value.exitstatus puts 'no deadlock'
Version data entries
13 entries across 13 versions & 1 rubygems