зеркало из https://github.com/github/ruby.git
Workaround a zombie process created by Open3
with MJIT worker enabled The problem: ``` $ ruby -ropen3 --jit -e 'Open3.capture2e("cmake") rescue nil;binding.irb' irb(main)[01:0]> Process.waitall => [[10656, #<Process::Status: pid 10656 exit 127>]] $ ruby -ropen3 -e 'Open3.capture2e("cmake") rescue nil;binding.irb' irb(main)[01:0]> Process.waitall => [] ``` Not sure why it's happening yet, but first I'd like to prevent trunk-mjit-wait from failing like http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2929075.
This commit is contained in:
Родитель
18f22490e8
Коммит
a6f8589914
|
@ -14,6 +14,14 @@ class TestGemExtCmakeBuilder < Gem::TestCase
|
|||
_, status = Open3.capture2e('cmake')
|
||||
skip 'cmake not present' unless status.success?
|
||||
rescue Errno::ENOENT
|
||||
# Open3.capture2e with ENOENT with JIT enabled leaves a zombie process.
|
||||
# TODO: avoid making the zombie on ENOENT with JIT
|
||||
if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
|
||||
begin
|
||||
Process.waitall
|
||||
rescue Errno::ECHILD
|
||||
end
|
||||
end
|
||||
skip 'cmake not present'
|
||||
end
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче