From a8e4d9a2493426c77eba1b3a33a865eb4b715463 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 21 Feb 2014 01:10:10 +0100 Subject: fix infinite recursion bug on exit after SIGUSR1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- examples/comprehensive | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'examples') diff --git a/examples/comprehensive b/examples/comprehensive index aa69f7d..9b9bf36 100644 --- a/examples/comprehensive +++ b/examples/comprehensive @@ -260,6 +260,10 @@ if get_dayness is not None: # Transition on exit in the same way, calculated on exit. old_signal_SIGTERM = signal_SIGTERM + if 'SIGTERM' not in conf_storage: + conf_storage['SIGTERM'] = old_signal_SIGTERM + else: + old_signal_SIGTERM = conf_storage['SIGTERM'] def signal_SIGTERM(signum, frame): global fadeout_time, fadeout_steps fadeout_time = 5 * (1 - get_dayness()) -- cgit v1.2.3-70-g09d2