diff --git a/SickBeard.py b/SickBeard.py index b6cc16b3..e5a36cc7 100755 --- a/SickBeard.py +++ b/SickBeard.py @@ -180,6 +180,16 @@ def main(): # Need console logging for SickBeard.py and SickBeard-console.exe consoleLogging = (not hasattr(sys, "frozen")) or (sickbeard.MY_NAME.lower().find('-console') > 0) + # Attempt to rename the process for easier debugging + try: + from setproctitle import setproctitle + except ImportError: + if consoleLogging: + sys.stderr.write(u"setproctitle module is not available.\n") + setproctitle = lambda t: None + + setproctitle(sickbeard.MY_NAME) + # Rename the main thread threading.currentThread().name = "MAIN"