From 9155908b7cfd7e47a48b759b1c414eeca482755a Mon Sep 17 00:00:00 2001 From: Naoto Ono Date: Sun, 20 Nov 2022 23:35:37 +0900 Subject: [PATCH] fix --- test/support/test_case.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/support/test_case.rb b/test/support/test_case.rb index 1cc5ebdb3..a8087cb0c 100644 --- a/test/support/test_case.rb +++ b/test/support/test_case.rb @@ -118,6 +118,8 @@ def wait_pid pid, sec end false + rescue Errno::ECHILD + true end def kill_safely pid, name, test_info @@ -142,10 +144,11 @@ def check_error(error, test_info) def kill_remote_debuggee test_info return unless r = test_info.remote_info + kill_safely r.pid, :remote, test_info + # Because the debuggee may be terminated by executing the following operations, we need to run them after `kill_safely` method. r.reader_thread.kill r.r.close r.w.close - kill_safely r.pid, :remote, test_info end def setup_remote_debuggee(cmd)