summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2014-10-25 01:30:36 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2014-10-25 01:31:58 +0200
commit6d18b0b804501f7f28dcedb0b7ad1211d94ec75e (patch)
tree866fd59a6413feeb601040cc466e589eb20183c8
parent56d2b72b6f8b2e1a27a16dbfdab10f0b83816ceb (diff)
downloadbcfg2-6d18b0b804501f7f28dcedb0b7ad1211d94ec75e.tar.gz
bcfg2-6d18b0b804501f7f28dcedb0b7ad1211d94ec75e.tar.bz2
bcfg2-6d18b0b804501f7f28dcedb0b7ad1211d94ec75e.zip
Server/Core: also shutdown on exceptions during fam blocking
Previously the server got stuck, if a keyboard interrupt occured during block_for_fam_events. The KeyboardInterrupt exception was only handled in the executable and it does not call shutdown for the Core. So the running fam thread does not get killed and the main thread waits for it.
-rw-r--r--src/lib/Bcfg2/Server/Core.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/Bcfg2/Server/Core.py b/src/lib/Bcfg2/Server/Core.py
index 892f2832a..470f40957 100644
--- a/src/lib/Bcfg2/Server/Core.py
+++ b/src/lib/Bcfg2/Server/Core.py
@@ -783,13 +783,13 @@ class Core(object):
for plug in self.plugins_by_type(Threaded):
plug.start_threads()
+
+ self.block_for_fam_events()
+ self._block()
except:
self.shutdown()
raise
- self.block_for_fam_events()
- self._block()
-
def _run(self):
""" Start up the server; this method should return
immediately. This must be overridden by a core