ruby-changes:20779
From: akr <ko1@a...>
Date: Wed, 3 Aug 2011 21:19:39 +0900 (JST)
Subject: [ruby-changes:20779] akr:r32827 (trunk): update doc.
akr 2011-08-03 21:18:50 +0900 (Wed, 03 Aug 2011) New Revision: 32827 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32827 Log: update doc. Modified files: trunk/lib/open3.rb Index: lib/open3.rb =================================================================== --- lib/open3.rb (revision 32826) +++ lib/open3.rb (revision 32827) @@ -70,6 +70,15 @@ # # Closing stdin, stdout and stderr does not wait the process. # + # You should be careful to avoid deadlocks. + # Since pipes are fixed length buffer, + # Open3.popen3("prog") {|i, o, e, t| o.read } deadlocks if + # the program generates many output on stderr. + # You should be read stdout and stderr simultaneously (using thread or IO.select). + # However if you don't need stderr output, Open3.popen2 can be used. + # If merged stdout and stderr output is not a problem, you can use Open3.popen2e. + # If you really needs stdout and stderr output as separate strings, you can consider Open3.capture3. + # def popen3(*cmd, &block) if Hash === cmd.last opts = cmd.pop.dup -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/