examples: add run_once to before_fork hook example
commit5176868d908b03dbd4d43c7fcc5545bccc2b138a
authorEric Wong <e@80x24.org>
Sat, 4 Oct 2014 02:14:21 +0000 (4 02:14 +0000)
committerEric Wong <e@80x24.org>
Wed, 22 Apr 2015 18:55:32 +0000 (22 18:55 +0000)
treea974d432c988ac98308c53a12a9a15fea2ed72d0
parent2bb8cc404232254af0d74f2dd3dec87d406fd764
examples: add run_once to before_fork hook example

There may be code in a before_fork hook which should run only once,
document an example using a guard variable since it may not be
immediately obvious to all users.

Inspired-by: BrĂ¡ulio Bhavamitra <braulio@eita.org.br>
http://bogomips.org/unicorn-public/m/20141004015707.GA1951@dcvr.yhbt.net.html
examples/unicorn.conf.rb