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

ruby-changes:30474

From: naruse <ko1@a...>
Date: Wed, 14 Aug 2013 19:16:38 +0900 (JST)
Subject: [ruby-changes:30474] naruse:r42553 (trunk): get detailed ps data to debug

naruse	2013-08-14 19:16:33 +0900 (Wed, 14 Aug 2013)

  New Revision: 42553

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

  Log:
    get detailed ps data to debug
    
    add -L/-H/-M to get thread info

  Modified files:
    trunk/test/ruby/test_notimp.rb
Index: test/ruby/test_notimp.rb
===================================================================
--- test/ruby/test_notimp.rb	(revision 42552)
+++ test/ruby/test_notimp.rb	(revision 42553)
@@ -30,7 +30,16 @@ class TestNotImplement < Test::Unit::Tes https://github.com/ruby/ruby/blob/trunk/test/ruby/test_notimp.rb#L30
         pid = nil
       }
     rescue Timeout::Error
-      ps = `ps -l #{pid}`
+      case RUBY_PLATFORM
+      when /linux/ # assume Linux Distribution uses procps
+        ps = `ps -eLf #{pid}`
+      when /freebsd/
+        ps = `ps -lH #{pid}`
+      when /darwin/
+        ps = `ps -lM #{pid}`
+      else
+        ps = `ps -l #{pid}`
+      end
       Process.kill(:KILL, pid)
       Process.wait pid
       assert_equal nil,  pid, ps

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

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