mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
get detailed ps data to debug
add -L/-H/-M to get thread info git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e74a9c0668
commit
e3488fcee1
1 changed files with 10 additions and 1 deletions
|
@ -30,7 +30,16 @@ class TestNotImplement < Test::Unit::TestCase
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue