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