From f2de94a1f55f1d85dc238bb3d445857eba26bc64 Mon Sep 17 00:00:00 2001 From: Petr Chalupa Date: Wed, 5 Feb 2020 20:50:47 +0100 Subject: [PATCH] Allow the child process to be already gone --- spec/concurrent/executor/cached_thread_pool_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/concurrent/executor/cached_thread_pool_spec.rb b/spec/concurrent/executor/cached_thread_pool_spec.rb index 1e502473e..048d6e2ec 100644 --- a/spec/concurrent/executor/cached_thread_pool_spec.rb +++ b/spec/concurrent/executor/cached_thread_pool_spec.rb @@ -212,6 +212,8 @@ module Concurrent pid = spawn RbConfig.ruby, test_file Process.waitpid pid expect($?.success?).to eq true + rescue Errno::ECHILD + # child already gone rescue Timeout::Error => e Process.kill :KILL, pid raise e