Method: Unicorn::Configurator#before_exec

Defined in:
lib/unicorn/configurator.rb

#before_exec(*args, &block) ⇒ Object

sets the before_exec hook to a given Proc object. This Proc object will be called by the master process right before exec()-ing the new unicorn binary. This is useful for freeing certain OS resources that you do NOT wish to share with the reexeced child process. There is no corresponding after_exec hook (for obvious reasons).



167
168
169
# File 'lib/unicorn/configurator.rb', line 167

def before_exec(*args, &block)
  set_hook(:before_exec, block_given? ? block : args[0], 1)
end