From: Thierry Parmentelat Date: Fri, 31 Jan 2014 15:59:12 +0000 (+0100) Subject: when doing e.g. systemctl stop nm.service, systemd attempts to kill nm, so we need... X-Git-Tag: nodemanager-5.2-10~6^2~6 X-Git-Url: http://git.onelab.eu/?p=nodemanager.git;a=commitdiff_plain;h=8eaedf83b2e9f66a61bd04fc6742615cec958746 when doing e.g. systemctl stop nm.service, systemd attempts to kill nm, so we need to really exit (os._exit) and not just have one random thread die --- diff --git a/tools.py b/tools.py index f081826..862efc6 100644 --- a/tools.py +++ b/tools.py @@ -333,7 +333,7 @@ def command_in_slice (slicename, argv): def init_signals (): def handler (signum, frame): logger.log("Received signal %d - exiting"%signum) - exit(1) + os._exit(1) signal.signal(signal.SIGHUP,handler) signal.signal(signal.SIGQUIT,handler) signal.signal(signal.SIGINT,handler)