diff --git a/test/mri/tests/ruby/test_process.rb b/test/mri/tests/ruby/test_process.rb index 1d04d22631b9..4d01d3eda39e 100644 --- a/test/mri/tests/ruby/test_process.rb +++ b/test/mri/tests/ruby/test_process.rb @@ -1823,7 +1823,12 @@ def test_system_sigpipe end end ensure - Process.kill(:KILL, pid) if (pid != 0) rescue false + # https://github.com/ruby/prism/issues/2289 + # Process.kill(:KILL, pid) if (pid != 0) rescue false + begin + Process.kill(:KILL, pid) if (pid != 0) + rescue Errno::ESRCH + end end if Process.respond_to?(:daemon)