mirror of
https://github.com/ruby/ruby.git
synced 2025-09-20 02:53:57 +02:00
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
This commit is contained in:
parent
73c5a99b50
commit
8507219097
1 changed files with 8 additions and 3 deletions
|
@ -36,9 +36,14 @@ class TestSignal < Test::Unit::TestCase
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
assert_nothing_raised("[ruby-dev:26128]") {
|
assert_nothing_raised("[ruby-dev:26128]") {
|
||||||
Process.kill(:USR1, pid)
|
Process.kill(:USR1, pid)
|
||||||
|
begin
|
||||||
Timeout.timeout(1) {
|
Timeout.timeout(1) {
|
||||||
Process.waitpid pid
|
Process.waitpid pid
|
||||||
}
|
}
|
||||||
|
rescue Timeout::Error
|
||||||
|
Process.kill(:TERM, pid)
|
||||||
|
raise
|
||||||
|
end
|
||||||
}
|
}
|
||||||
ensure
|
ensure
|
||||||
r.close
|
r.close
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue