Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ono-max committed Nov 20, 2022
1 parent 9d87a05 commit 9155908
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/support/test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ def wait_pid pid, sec
end

false
rescue Errno::ECHILD
true
end

def kill_safely pid, name, test_info
Expand All @@ -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)
Expand Down

0 comments on commit 9155908

Please sign in to comment.