From a0ced1497082b8230e51760d3600a43d812580b6 Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 5 Jun 2005 07:04:06 +0000 Subject: kill a process spawned by test_exit_action. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_signal.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/ruby/test_signal.rb b/test/ruby/test_signal.rb index 7a75f57fb..2401e3211 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 -- cgit