[Win32utils-devel] [ win32utils-Bugs-20455 ] win32-open3: crashes after 170 popen3 operations

noreply at rubyforge.org noreply at rubyforge.org
Fri May 30 16:54:07 EDT 2008


Bugs item #20455, was opened at 2008-05-30 16:54
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=411&aid=20455&group_id=85

Category: None
Group: Code
Status: Open
Resolution: None
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: win32-open3: crashes after 170 popen3 operations

Initial Comment:
OS: XP w/SP2 
C:\Documents and Settings\twasson>ruby -v
ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]
win32-open3 (0.2.5)

After looping through an "Open3.popen3", the loop crashes with an IO error. We've tried a few things like other read verbs (get, read, readlines, etc) and have tried explicitly closing things.

Distilled to it's essence, I think this snippet shows the problem:

require "win32/open3"
i = 1
while (i<200)
        Open3.popen3("dir") do |stdin, stdout, stderr|
        e = stdout.readlines   
	end
puts i
i += 1
	
end



C:\Documents and Settings\me>ruby goober.rb

1
 ... etc ...
170

goober.rb:6:in `readlines': closed stream (IOError)
        from goober.rb:6
        from goober.rb:5:in `popen3'
        from goober.rb:5

The non windows version runs fine on Linux.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=411&aid=20455&group_id=85


More information about the win32utils-devel mailing list