Module: Langfuse::ForkSafety::ProcessHook Private

Defined in:
lib/langfuse/fork_safety.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Ruby routes Kernel#fork, Process.fork, and IO.popen("-") through Process._fork. Ruby 3.2 documents this override point for monitoring libraries that need before-fork or after-fork behavior.

Instance Method Summary collapse

Instance Method Details

#_forkObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



12
13
14
15
16
# File 'lib/langfuse/fork_safety.rb', line 12

def _fork
  pid = super
  Langfuse::ForkSafety.after_fork if pid.zero?
  pid
end