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

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

#daemon(*args) ⇒ Object

A call to Process.daemon ( rubyapi.org/3.1/o/process#method-c-daemon ) forks the current process and keeps executing code in the child process, killing off the parent, thus effectively replacing it. This is not covered by _fork and thus we have some extra code for it.



91
92
93
94
95
96
97
# File 'lib/datadog/core/utils/at_fork_monkey_patch.rb', line 91

def daemon(*args)
  result = super

  AtForkMonkeyPatch.run_at_fork_blocks(:child)

  result
end