summaryrefslogtreecommitdiff
path: root/test/ruby/test_notimp.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_notimp.rb')
-rw-r--r--test/ruby/test_notimp.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/ruby/test_notimp.rb b/test/ruby/test_notimp.rb
index d16ad5155b..10affd6c81 100644
--- a/test/ruby/test_notimp.rb
+++ b/test/ruby/test_notimp.rb
@@ -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