1
0
Fork 0
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:
naruse 2013-08-14 10:16:33 +00:00
parent e74a9c0668
commit e3488fcee1

View file

@ -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