From 6d18b0b804501f7f28dcedb0b7ad1211d94ec75e Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Sat, 25 Oct 2014 01:30:36 +0200 Subject: 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. --- src/lib/Bcfg2/Server/Core.py | 6 +++--- 1 file 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 -- cgit v1.2.3-1-g7c22