noreply at rubyforge.org
2008-May-30 20:54 UTC
[Win32utils-devel] [ win32utils-Bugs-20455 ] win32-open3: crashes after 170 popen3 operations
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
Berger, Daniel
2008-Jun-02 13:50 UTC
[Win32utils-devel] win32-open3: crashesafter 170 popen3 operations
Hi, <snip>> 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:5FYI, this was fixed in CVS and 0.2.6 was released this weekend. Thanks go to Park for the patch. Regards, Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.