diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2014-10-25 01:30:36 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2014-10-25 01:36:50 +0200 |
commit | 477841f0508b6a750f7899622729a0c9fc40f07e (patch) | |
tree | ea534bf146c0eabc2478d823fa0afde6d84cac23 /src | |
parent | 9678b216178b3470bb5e1b5894ae36371df84780 (diff) | |
download | bcfg2-477841f0508b6a750f7899622729a0c9fc40f07e.tar.gz bcfg2-477841f0508b6a750f7899622729a0c9fc40f07e.tar.bz2 bcfg2-477841f0508b6a750f7899622729a0c9fc40f07e.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.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Bcfg2/Server/Core.py | 10 |
1 files 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. """ |