From 14fffda3ffd6b360cd1b9f9f7a5c278ef2b37ca7 Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 25 Jan 2013 15:26:06 +0100 Subject: [PATCH] Don't add signal handlers when daemonized. fix #1346 --- couchpotato/core/_base/_core/main.py | 1 + couchpotato/runner.py | 1 + 2 files changed, 2 insertions(+) diff --git a/couchpotato/core/_base/_core/main.py b/couchpotato/core/_base/_core/main.py index ec421ac2..0423e666 100644 --- a/couchpotato/core/_base/_core/main.py +++ b/couchpotato/core/_base/_core/main.py @@ -176,6 +176,7 @@ class Core(Plugin): }) def signalHandler(self): + if Env.get('daemonized'): return def signal_handler(signal, frame): fireEvent('app.shutdown') diff --git a/couchpotato/runner.py b/couchpotato/runner.py index 2081d117..37152582 100644 --- a/couchpotato/runner.py +++ b/couchpotato/runner.py @@ -118,6 +118,7 @@ def runCouchPotato(options, base_path, args, data_dir = None, log_dir = None, En Env.set('console_log', options.console_log) Env.set('quiet', options.quiet) Env.set('desktop', desktop) + Env.set('daemonized', options.daemon) Env.set('args', args) Env.set('options', options)