about summary refs log tree commit homepage
path: root/.gitattributes
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2017-02-21 16:33:09 -0800
committerEric Wong <e@80x24.org>2017-02-23 20:23:44 +0000
commitd322345251e15125df896bb8f0a5b53b49a1bf3f (patch)
treebe7fce006c6170539f12c7c1b6095edb351f6f5b /.gitattributes
parentd4e0ced16710e456cd192784ab106091568ebde3 (diff)
downloadunicorn-chroot.tar.gz
This adds a hook that is called after the application has
been loaded by the worker process, directly before it starts
accepting requests.  This hook is necessary if your application
needs to gain access to resources during initialization,
and then drop privileges before serving requests.

This is especially useful in conjunction with chroot support
so the app can load all the normal ruby libraries it needs
to function, and then chroot before accepting requests.

If you are preloading the app, it's possible to drop privileges
or chroot in after_fork, but if you are not preloading the app,
the only way to currently do this is to override the private
HttpServer#init_worker_process method, and overriding private
methods is a recipe for future breakage if the internals are
modified.  This hook allows for such functionality to be
supported and not break in future versions of Unicorn.
Diffstat (limited to '.gitattributes')
0 files changed, 0 insertions, 0 deletions