diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | test/testunit/test_parallel.rb | 7 |
2 files changed, 10 insertions, 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> * encoding.c (rb_enc_set_index, rb_enc_associate_index): should diff --git a/test/testunit/test_parallel.rb b/test/testunit/test_parallel.rb index 4c4d14b226..c8f6a9ec18 100644 --- a/test/testunit/test_parallel.rb +++ b/test/testunit/test_parallel.rb @@ -18,11 +18,14 @@ module TestParallel def teardown if @worker_pid && @worker_in begin - @worker_in.puts "quit" + begin + @worker_in.puts "quit" + rescue IOError, Errno::EPIPE + end timeout(2) do Process.waitpid(@worker_pid) end - rescue IOError, Errno::EPIPE, Timeout::Error + rescue Timeout::Error begin Process.kill(:KILL, @worker_pid) rescue Errno::ESRCH |