Sha256: e9d51751ad09fb5a1fd1dce6892cd960cec7f3dda63d99c50d3bf464fef1449c

Contents?: true

Size: 314 Bytes

Versions: 27

Compression:

Stored size: 314 Bytes

Contents

require 'open4'

pid = Process.pid
fds = lambda{|pid| Dir["/proc/#{ pid }/fd/*"]}

loop do
  before = fds[pid] 
  Open4.popen4 'ruby -e"buf = STDIN.read; STDOUT.puts buf; STDERR.puts buf "' do |p,i,o,e|
    i.puts 42
    i.close_write
    o.read
    e.read
  end
  after = fds[pid] 
  p(after - before)
  puts
end

Version data entries

27 entries across 27 versions & 4 rubygems

Version Path
ahoward-open4-1.0.0 white_box/leak.rb
open4-1.3.4 white_box/leak.rb
open4-1.3.3 white_box/leak.rb
open4-1.3.2 white_box/leak.rb
open4-1.3.1 white_box/leak.rb
open4-1.3.0 white_box/leak.rb
open4-1.2.0 white_box/leak.rb
open4-1.1.0 white_box/leak.rb
crazy_ivan-1.2.4 lib/crazy_ivan/vendor/open4-1.0.1/white_box/leak.rb
crazy_ivan-1.2.3 lib/crazy_ivan/vendor/open4-1.0.1/white_box/leak.rb
crazy_ivan-1.2.2 lib/crazy_ivan/vendor/open4-1.0.1/white_box/leak.rb
crazy_ivan-1.2.1 lib/crazy_ivan/vendor/open4-1.0.1/white_box/leak.rb
crazy_ivan-1.2.0 lib/crazy_ivan/vendor/open4-1.0.1/white_box/leak.rb
crazy_ivan-1.1.1 lib/crazy_ivan/vendor/open4-1.0.1/white_box/leak.rb
crazy_ivan-1.1.0 lib/crazy_ivan/vendor/open4-1.0.1/white_box/leak.rb
crazy_ivan-1.0.0 lib/crazy_ivan/vendor/open4-1.0.1/white_box/leak.rb
ginst-2009.12.8 vendor/gems/open4-1.0.1/white_box/leak.rb
ginst-2009.11.24 vendor/gems/open4-1.0.1/white_box/leak.rb
ginst-2009.11.23 vendor/gems/open4-1.0.1/white_box/leak.rb
ginst-2.0.1 vendor/gems/open4-1.0.1/white_box/leak.rb