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

ruby-changes:28417

From: shirosaki <ko1@a...>
Date: Fri, 26 Apr 2013 00:36:39 +0900 (JST)
Subject: [ruby-changes:28417] shirosaki:r40469 (trunk): test_rinda.rb: Use KILL on Windows

shirosaki	2013-04-26 00:36:30 +0900 (Fri, 26 Apr 2013)

  New Revision: 40469

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

  Log:
    test_rinda.rb: Use KILL on Windows
    
    * test/rinda/test_rinda.rb (TupleSpaceProxyTest#test_take_bug_8215):
      use KILL on Windows since TERM doen't work and ruby process remains
      after test-all on Windows.

  Modified files:
    trunk/ChangeLog
    trunk/test/rinda/test_rinda.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 40468)
+++ ChangeLog	(revision 40469)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Apr 25 23:39:42 2013  Hiroshi Shirosaki  <h.shirosaki@g...>
+
+	* test/rinda/test_rinda.rb (TupleSpaceProxyTest#test_take_bug_8215):
+	  use KILL on Windows since TERM doen't work and ruby process remains
+	  after test-all on Windows.
+
 Thu Apr 25 23:16:28 2013  Tanaka Akira  <akr@f...>
 
 	* ext/curses/extconf.rb: Implement
Index: test/rinda/test_rinda.rb
===================================================================
--- test/rinda/test_rinda.rb	(revision 40468)
+++ test/rinda/test_rinda.rb	(revision 40469)
@@ -515,8 +515,9 @@ class TupleSpaceProxyTest < Test::Unit:: https://github.com/ruby/ruby/blob/trunk/test/rinda/test_rinda.rb#L515
     assert_equal([[:test_take, 42]], @ts_base.read_all([:test_take, nil]),
                  '[bug:8215] tuple lost')
   ensure
-    Process.kill("TERM", write) if write && status.nil?
-    Process.kill("TERM", take)  if take
+    signal = /mswin|mingw/ =~ RUBY_PLATFORM ? "KILL" : "TERM"
+    Process.kill(signal, write) if write && status.nil?
+    Process.kill(signal, take)  if take
   end
 
   def have_fork?

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

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