about summary refs log tree commit homepage
path: root/lib/unicorn/app
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2017-03-08 10:19:02 -0800
committerEric Wong <e@80x24.org>2017-03-10 20:27:41 +0000
commitea1a4360d66a833d75fbd887388d8cd4fe4ae299 (patch)
treec2f631143f2acb5fcfd092097ee6db42ad55f762 /lib/unicorn/app
parent59e39cbc68c49623949b3e5c2d7e113e96e90a27 (diff)
downloadunicorn-ea1a4360d66a833d75fbd887388d8cd4fe4ae299.tar.gz
The worker_exec configuration option makes all worker processes
exec after forking.  This initializes the worker processes with
separate memory layouts, defeating address space discovery
attacks on operating systems supporting address space layout
randomization, such as Linux, MacOS X, NetBSD, OpenBSD, and
Solaris.

Support for execing workers is very similar to support for reexecing
the master process.  The main difference is the worker's to_i and
master pipes also need to be inherited after worker exec just as the
listening sockets need to be inherited after reexec.

Because execing working is similar to reexecing the master, this
extracts a couple of methods from reexec (listener_sockets and
close_sockets_on_exec), so they can be reused in worker_spawn.
Diffstat (limited to 'lib/unicorn/app')
0 files changed, 0 insertions, 0 deletions