[Kimchi-devel] [PATCH] Bug fix #529: Kill all Kimchi process when stopping kimchid service

Daniel Henrique Barboza danielhb at linux.vnet.ibm.com
Tue Dec 9 17:38:53 UTC 2014


Reviewed-by: Daniel Barboza <danielhb at linux.vnet.ibm.com>

On 12/09/2014 02:49 PM, Aline Manera wrote:
> When using "tree.mount(); engine.start(); engine.block()" to start cherrypy
> server, we need to manually subscribe to the signal handlers plugin.
>
> For reference: https://cherrypy.readthedocs.org/en/3.2.6/refman/process/plugins/signalhandler.html
>
> Signed-off-by: Aline Manera <alinefm at linux.vnet.ibm.com>
> ---
>   src/kimchi/server.py | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/src/kimchi/server.py b/src/kimchi/server.py
> index ec78b6c..eb58465 100644
> --- a/src/kimchi/server.py
> +++ b/src/kimchi/server.py
> @@ -172,6 +172,10 @@ class Server(object):
>               cherrypy.tree.mount(plugin_app, script_name, plugin_config)
>
>       def start(self):
> +        # Subscribe to SignalHandler plugin
> +        if hasattr(cherrypy.engine, 'signal_handler'):
> +            cherrypy.engine.signal_handler.subscribe()
> +
>           cherrypy.engine.start()
>           cherrypy.engine.block()
>




More information about the Kimchi-devel mailing list