1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-08-13 16:53:54 -04:00

Fix for restart spawning more then one process of SickRage

This commit is contained in:
echel0n 2014-05-29 01:00:13 -07:00
parent 42b621103f
commit 6fc93be7b5

View File

@ -1326,11 +1326,12 @@ def saveAndShutdown(restart=False):
popen_list += ['--nolaunch']
logger.log(u"Restarting SickRage with " + str(popen_list))
logger.close()
p = subprocess.Popen(popen_list, cwd=os.getcwd())
p.wait()
status = p.returncode
subprocess.Popen(popen_list, cwd=os.getcwd())
time.sleep(5)
os._exit(status)
logger.log(u"SickRage successfully restarted ...")
os._exit(0)
def invoke_command(to_call, *args, **kwargs):