Module: ConvertSdk::ForkGuard::ForkHook Private

Defined in:
lib/convert_sdk/fork_guard.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.

The prepended +_fork+ wrapper (Rails ForkTracker pattern). In the child (+super+ returns 0) it runs the shared re-arm path; the parent path is a pass-through.

Instance Method Summary collapse

Instance Method Details

#_forkInteger

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.

Returns the pid returned by the real +_fork+.

Returns:

  • (Integer)

    the pid returned by the real +_fork+.



137
138
139
140
141
# File 'lib/convert_sdk/fork_guard.rb', line 137

def _fork
  pid = super
  ForkGuard.rearm! if pid.zero?
  pid
end