2018-12-13 13:39:08 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-06-09 08:11:10 +05:30
|
|
|
if RUBY_PLATFORM.include?('darwin')
|
2018-12-13 13:39:08 +05:30
|
|
|
Gitlab::Cluster::LifecycleEvents.on_before_fork do
|
|
|
|
require 'fiddle'
|
|
|
|
|
|
|
|
# Dynamically load Foundation.framework, ~implicitly~ initialising
|
2021-09-04 01:27:46 +05:30
|
|
|
# the Objective-C runtime before any forking happens in webserver
|
2018-12-13 13:39:08 +05:30
|
|
|
#
|
|
|
|
# From https://bugs.ruby-lang.org/issues/14009
|
|
|
|
Fiddle.dlopen '/System/Library/Frameworks/Foundation.framework/Foundation'
|
|
|
|
end
|
|
|
|
end
|