# class Unicorn::HttpServer

This is the process manager of Unicorn. This manages worker processes which in turn handle the I/O and application process. Listener sockets are started in the master process and shared with forked worker children.

Users do not need to know the internals of this class, but reading the source is education for programmers wishing to learn how Unicorn works. See Unicorn::Configurator for information on how to configure Unicorn.

### Constants

START_CTX

  We populate this at startup so we can figure out how to reexecute and upgrade the currently running instance of Unicorn This Hash is considered a stable interface and changing its contents will allow you to switch between different installations of Unicorn or even different installations of the same applications without downtime. Keys of this constant Hash are described as follows:

  - 0 - the path to the unicorn/unicorn_rails executable

  - :argv - a deep copy of the ARGV array the executable originally saw

  - :cwd - the working directory of the application, this is where

  you originally started Unicorn.

  To change your unicorn executable to a different path without downtime, you can set the following in your Unicorn config file, HUP and then continue with the traditional USR2 + QUIT upgrade steps:

      Unicorn::HttpServer::START_CTX[0] = "/home/bofh/2.2.0/bin/unicorn"