status = POpen4::popen4("dir") do |stdout, stderr, stdin, pid|
puts "pid : #{ pid }"
puts "stdout : #{ stdout.read.strip }"
puts "stderr : #{ stderr.read.strip }"
end
Directory of C:\
stderr : File Not Found
C:/Ruby193/lib/ruby/gems/1.9.1/gems/POpen4-0.1.4/lib/popen4.rb:60:in `rewind': Invalid argument (Errno::EINVAL)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/POpen4-0.1.4/lib/popen4.rb:60:in `block in popen4'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/win32-open3-19-0.0.2/lib/win32/open3.rb:6:in `call'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/win32-open3-19-0.0.2/lib/win32/open3.rb:6:in `block in popen4'
from C:/Ruby193/lib/ruby/1.9.1/open3.rb:208:in `popen_run'
from C:/Ruby193/lib/ruby/1.9.1/open3.rb:90:in `popen3'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/win32-open3-19-0.0.2/lib/win32/open3.rb:5:in `popen4'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/POpen4-0.1.4/lib/popen4.rb:48:in `popen4'
from build/SubProcess.rb:66:in `<main>'