summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-06-05 07:04:06 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-06-05 07:04:06 +0000
commit6cb79f15034c484d042b5cc4101439e9c836b1ad (patch)
tree8e8399b487b35f9c55ee7ce77d8e5b7fbb882603 /test
parentd5b82649fad73c5effea1c830644b2deacc64b5c (diff)
kill a process spawned by test_exit_action.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_signal.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/ruby/test_signal.rb b/test/ruby/test_signal.rb
index 7a75f57..2401e32 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