Updated openstack/openstack
Project: openstack/heat  198c4eeea9c23afc97c39930163e46621cfe406f

Fix signal handling for WSGI servers

Previously, sending a SIGHUP to the parent process would close the
shared socket used with all the WSGI servers (problematic when multiple
workers are present). Also, exiting the wait loop in the parent would
cause the children to be orphaned. Instead, make the parent process
restart all the children servers upon receipt of SIGHUP. This behavior
seems to make sense given that sending SIGHUP to a child restarts and
creates a new server (due to the parent handling of the children).

Another fix was to issue a SIGTERM upon Ctrl-C in order to not leave
parentless children. SIGTERM was chosen instead of SIGINT simply to
avoid worker tracebacks on the terminal.

Minor unrelated change: the WSGI server in single worker mode has been
changed to also respect the debug flag, exactly the same as with
multiple workers.

Note: the original bug report was examining lack of signal handling
based on the Oslo service code. However, only the engine makes use of
it.

Change-Id: I8519cc6fedf72b38a8ce0762bb86cd70e58e0dc7
Closes-bug: #1276694