[前][次][番号順一覧][スレッド一覧]

ruby-changes:29362

From: nobu <ko1@a...>
Date: Wed, 19 Jun 2013 16:47:22 +0900 (JST)
Subject: [ruby-changes:29362] nobu:r41414 (trunk): envutil.rb: reap zombies

nobu	2013-06-19 16:47:10 +0900 (Wed, 19 Jun 2013)

  New Revision: 41414

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41414

  Log:
    envutil.rb: reap zombies
    
    * test/ruby/envutil.rb (EnvUtil#invoke_ruby): reap zombies.

  Modified files:
    trunk/test/ruby/envutil.rb

Index: test/ruby/envutil.rb
===================================================================
--- test/ruby/envutil.rb	(revision 41413)
+++ test/ruby/envutil.rb	(revision 41414)
@@ -68,10 +68,17 @@ module EnvUtil https://github.com/ruby/ruby/blob/trunk/test/ruby/envutil.rb#L68
         signal = /mswin|mingw/ =~ RUBY_PLATFORM ? :KILL : :TERM
         begin
           Process.kill signal, pid
+          Timeout.timeout((reprieve unless signal == :KILL)) do
+            Process.wait(pid)
+          end
         rescue Errno::ESRCH
           break
+        rescue Timeout::Error
+          raise if signal == :KILL
+          signal = :KILL
         else
-        end until signal == :KILL or (sleep reprieve; signal = :KILL; false)
+          break
+        end while true
         raise Timeout::Error
       end
       out_p.close if capture_stdout

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]