mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/testunit/test_parallel.rb (TestParallelWorker#teardown): wait
the child process even if the communition pipe is broken. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cfa0035962
commit
1a1c95404f
2 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Thu Jul 7 17:55:05 2011 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* test/testunit/test_parallel.rb (TestParallelWorker#teardown): wait
|
||||||
|
the child process even if the communition pipe is broken.
|
||||||
|
|
||||||
Thu Jul 7 15:44:42 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Thu Jul 7 15:44:42 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* encoding.c (rb_enc_set_index, rb_enc_associate_index): should
|
* encoding.c (rb_enc_set_index, rb_enc_associate_index): should
|
||||||
|
|
|
@ -17,12 +17,15 @@ module TestParallel
|
||||||
|
|
||||||
def teardown
|
def teardown
|
||||||
if @worker_pid && @worker_in
|
if @worker_pid && @worker_in
|
||||||
|
begin
|
||||||
begin
|
begin
|
||||||
@worker_in.puts "quit"
|
@worker_in.puts "quit"
|
||||||
|
rescue IOError, Errno::EPIPE
|
||||||
|
end
|
||||||
timeout(2) do
|
timeout(2) do
|
||||||
Process.waitpid(@worker_pid)
|
Process.waitpid(@worker_pid)
|
||||||
end
|
end
|
||||||
rescue IOError, Errno::EPIPE, Timeout::Error
|
rescue Timeout::Error
|
||||||
begin
|
begin
|
||||||
Process.kill(:KILL, @worker_pid)
|
Process.kill(:KILL, @worker_pid)
|
||||||
rescue Errno::ESRCH
|
rescue Errno::ESRCH
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue