From 477841f0508b6a750f7899622729a0c9fc40f07e 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 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/Bcfg2/Server/Core.py b/src/lib/Bcfg2/Server/Core.py index f60b68f45..6dfe4df1f 100644 --- a/src/lib/Bcfg2/Server/Core.py +++ b/src/lib/Bcfg2/Server/Core.py @@ -847,15 +847,15 @@ class BaseCore(object): for plug in self.plugins_by_type(Threaded): plug.start_threads() + + if self.debug_flag: + self.set_debug(None, self.debug_flag) + self.block_for_fam_events() + self._block() except: self.shutdown() raise - if self.debug_flag: - self.set_debug(None, self.debug_flag) - self.block_for_fam_events() - self._block() - def _daemonize(self): """ Daemonize the server and write the pidfile. This must be overridden by a core implementation. """ -- cgit v1.2.3-1-g7c22