about summary refs log tree commit homepage
path: root/lib/unicorn.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-03-02 18:48:47 -0800
committerEric Wong <normalperson@yhbt.net>2009-03-03 11:13:33 -0800
commit56aaf96ffccebf70bf98f41c64bf533cef68f802 (patch)
tree030620cf489aa64d1d3311112e3a9f76d63b5e28 /lib/unicorn.rb
parent5517fa27191228af9ef9ee2f4491398c73b505c1 (diff)
downloadunicorn-56aaf96ffccebf70bf98f41c64bf533cef68f802.tar.gz
This means processes will share less memory but things
should be compatible with all existing setups.
Diffstat (limited to 'lib/unicorn.rb')
-rw-r--r--lib/unicorn.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb
index 42ac8c0..998f8b8 100644
--- a/lib/unicorn.rb
+++ b/lib/unicorn.rb
@@ -89,7 +89,7 @@ module Unicorn
       config_listeners.each { |addr| listen(addr) }
       listen(Const::DEFAULT_LISTENER) if @listeners.empty?
       self.pid = @config[:pid]
-      build_app!
+      build_app! if @preload_app
       spawn_missing_workers
       self
     end
@@ -391,6 +391,7 @@ module Unicorn
     # traps for USR1, USR2, and HUP may be set in the @after_fork Proc
     # by the user.
     def init_worker_process(worker)
+      build_app! unless @preload_app
       TRAP_SIGS.each { |sig| trap(sig, 'IGNORE') }
       trap('CHLD', 'DEFAULT')
       trap('USR1') do