diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-06-05 07:04:06 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-06-05 07:04:06 +0000 |
commit | 8507219097b2ee57bad4b1ad03c7f292ce45ada6 (patch) | |
tree | 3997e40176e6bb0d872582b8518a52996430b58e /test/ruby/test_signal.rb | |
parent | 73c5a99b5088461b3b97f345fc4cc7c6c44e1177 (diff) | |
download | ruby-8507219097b2ee57bad4b1ad03c7f292ce45ada6.tar.gz |
kill a process spawned by test_exit_action.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_signal.rb')
-rw-r--r-- | test/ruby/test_signal.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/ruby/test_signal.rb b/test/ruby/test_signal.rb index 7a75f57fbe..2401e3211e 100644 --- a/test/ruby/test_signal.rb +++ b/test/ruby/test_signal.rb @@ -36,9 +36,14 @@ class TestSignal < Test::Unit::TestCase sleep 0.1 assert_nothing_raised("[ruby-dev:26128]") { Process.kill(:USR1, pid) - Timeout.timeout(1) { - Process.waitpid pid - } + begin + Timeout.timeout(1) { + Process.waitpid pid + } + rescue Timeout::Error + Process.kill(:TERM, pid) + raise + end } ensure r.close |