123456789_123456789_123456789_123456789_123456789_

Module: SimpleCov::ProcessForkHook

Relationships & Source Files
Defined in: lib/simplecov/process.rb

Overview

Prepended onto Process's singleton class so every fork — direct or via Kernel.fork / IO.popen — re-runs SimpleCov's at_fork callback in the child.

Instance Method Summary

Instance Method Details

#_fork

[ GitHub ]

  
# File 'lib/simplecov/process.rb', line 17

def _fork
  pid = super
  SimpleCov.at_fork.call(::Process.pid) if pid.zero? && defined?(SimpleCov) && Coverage.running?
  pid
end