From 17decda1e39f4b660a58de08dc1ba89722f924b3 Mon Sep 17 00:00:00 2001 From: Randall Leeds Date: Wed, 4 Aug 2010 04:31:47 +0800 Subject: [PATCH] catch SystemExit exception and exit quietly raised by: 1) workers started during reload (main loop) that are killed later 2) the arbiter process during Ctl-C or other halt signals --- gunicorn/arbiter.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gunicorn/arbiter.py b/gunicorn/arbiter.py index 2a615328..ff8e325a 100644 --- a/gunicorn/arbiter.py +++ b/gunicorn/arbiter.py @@ -168,6 +168,8 @@ class Arbiter(object): self.halt() except KeyboardInterrupt: self.halt() + except SystemExit: + raise except Exception: self.log.info("Unhandled exception in main loop:\n%s" % traceback.format_exc())