ruby-changes:61467
From: Nobuyoshi <ko1@a...>
Date: Wed, 3 Jun 2020 17:35:41 +0900 (JST)
Subject: [ruby-changes:61467] eb2b7fca43 (master): Fixed up 56ca006784d
https://git.ruby-lang.org/ruby.git/commit/?id=eb2b7fca43 From eb2b7fca437ceea90a391729419e211b1d5a7ea8 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 3 Jun 2020 17:23:04 +0900 Subject: Fixed up 56ca006784d Run lldb just before sending ABRT or KILL signal. Some tests terminate child processes by TERM signal intentionally. diff --git a/tool/lib/envutil.rb b/tool/lib/envutil.rb index fb9d1fa..0bd8bdb 100644 --- a/tool/lib/envutil.rb +++ b/tool/lib/envutil.rb @@ -87,14 +87,19 @@ module EnvUtil https://github.com/ruby/ruby/blob/trunk/tool/lib/envutil.rb#L87 pgroup = pid end - if /darwin/ =~ RUBY_PLATFORM - # sudo -n: --non-interactive - # lldb -p: attach - # -o: run command - puts `sudo -n lldb -p #{pid} --batch -o "bt all" -o "call rb_vmdebug_stack_dump_all_threads()" -o quit` - end + lldb = true if /darwin/ =~ RUBY_PLATFORM while signal = signals.shift + + if lldb and [:ABRT, :KILL].include?(signal) + lldb = false + # sudo -n: --non-interactive + # lldb -p: attach + # -o: run command + system(*%W[sudo -n lldb -p #{pid} --batch -o bt\ all -o call\ rb_vmdebug_stack_dump_all_threads() -o quit]) + true + end + begin Process.kill signal, pgroup rescue Errno::EINVAL @@ -108,6 +113,8 @@ module EnvUtil https://github.com/ruby/ruby/blob/trunk/tool/lib/envutil.rb#L113 begin Timeout.timeout(reprieve) {Process.wait(pid)} rescue Timeout::Error + else + break end end end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/