Method: Datadog::Core::Utils::AtForkMonkeyPatch::ProcessMonkeyPatch#_fork

Defined in:
lib/datadog/core/utils/at_fork_monkey_patch.rb

#_forkObject

Hook provided by Ruby 3.1+ for observability libraries that want to know about fork, see github.com/ruby/ruby/pull/5017 and bugs.ruby-lang.org/issues/17795



80
81
82
83
84
85
86
# File 'lib/datadog/core/utils/at_fork_monkey_patch.rb', line 80

def _fork
  pid = super

  AtForkMonkeyPatch.run_at_fork_blocks(:child) if pid == 0

  pid
end