Don't fork marconi-server unless USE_SCREEN=False

Marconi's server should be forked *just* when running under devstack and
when USE_SCREEN is set to False.

Change-Id: Id891c85b5719ef1bcd3b5ddf92a54d2b4fe3a34d
Closes-bug: #1301268
This commit is contained in:
Flavio Percoco 2014-04-02 11:10:47 +02:00
parent 43883fc9c4
commit 08841d1742

View File

@ -34,6 +34,9 @@ def run():
# want it to. This is specifically needed to allow marconi to
# run under devstack, but it may also be useful for other scenarios.
# Open /dev/zero and /dev/null for redirection.
# Daemonizing marconi-server is needed *just* when running under devstack
# and when `USE_SCREEN` is set to False.
if os.environ.get('USE_SCREEN', '').lower() == 'false':
zerofd = os.open('/dev/zero', os.O_RDONLY)
nullfd = os.open('/dev/null', os.O_WRONLY)