Module: SimpleCov::ProcessForkHook

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 collapse

Instance Method Details

#_forkObject



17
18
19
20
21
# 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