From ffe5b3ad0ace1bda0a50373b4fc30bd702a62ec7 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Sun, 23 Apr 2017 18:29:03 -0400 Subject: Log exit conditions --- cryptech_muxd | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cryptech_muxd') diff --git a/cryptech_muxd b/cryptech_muxd index 5b458a4..8e57ef8 100755 --- a/cryptech_muxd +++ b/cryptech_muxd @@ -438,4 +438,8 @@ if __name__ == "__main__": try: tornado.ioloop.IOLoop.current().run_sync(main) except KeyboardInterrupt: - pass + logger.debug("Normal SIGTERM exit") + except: + logger.exception("Unhandled exception") + else: + logger.debug("Main loop exited") -- cgit v1.2.3 From bf19937394ad4286d4c0e820ca128ea0cc95e35a Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Wed, 26 Apr 2017 20:00:30 -0400 Subject: Don't intefere with sys.exit(). --- cryptech_muxd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cryptech_muxd') diff --git a/cryptech_muxd b/cryptech_muxd index 8e57ef8..d28f758 100755 --- a/cryptech_muxd +++ b/cryptech_muxd @@ -437,8 +437,8 @@ def main(): if __name__ == "__main__": try: tornado.ioloop.IOLoop.current().run_sync(main) - except KeyboardInterrupt: - logger.debug("Normal SIGTERM exit") + except (SystemExit, KeyboardInterrupt): + pass except: logger.exception("Unhandled exception") else: -- cgit v1.2.3