Merge branch 'prevent-high-sierra-fork-crash' into 'master'
Prevent Unicorn crashing in development on macOS See merge request gitlab-org/gitlab-ce!16649
This commit is contained in:
commit
90d0396d83
1 changed files with 13 additions and 0 deletions
|
@ -1,2 +1,15 @@
|
|||
worker_processes 2
|
||||
timeout 60
|
||||
|
||||
before_fork do |server, worker|
|
||||
if /darwin/ =~ RUBY_PLATFORM
|
||||
require 'fiddle'
|
||||
|
||||
# Dynamically load Foundation.framework, ~implicitly~ initialising
|
||||
# the Objective-C runtime before any forking happens in Unicorn
|
||||
#
|
||||
# From https://bugs.ruby-lang.org/issues/14009
|
||||
Fiddle.dlopen '/System/Library/Frameworks/Foundation.framework/Foundation'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue