summaryrefslogtreecommitdiffstats
path: root/test/ruby/test_signal.rb
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
commitc72b5106b276224713748ba822f6703e57c2fd69 (patch)
tree3997e40176e6bb0d872582b8518a52996430b58e /test/ruby/test_signal.rb
parent206c3dca485366a88f090c997679b6feca167116 (diff)
downloadruby-c72b5106b276224713748ba822f6703e57c2fd69.tar.gz
ruby-c72b5106b276224713748ba822f6703e57c2fd69.tar.xz
ruby-c72b5106b276224713748ba822f6703e57c2fd69.zip
kill a process spawned by test_exit_action.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_signal.rb')
-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 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