summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/Api.py5
-rw-r--r--module/InitHomeDir.py1
-rwxr-xr-xpyLoadCore.py6
3 files changed, 8 insertions, 4 deletions
diff --git a/module/Api.py b/module/Api.py
index 1a69a0a27..54aeff669 100644
--- a/module/Api.py
+++ b/module/Api.py
@@ -183,8 +183,9 @@ class Api(Iface):
self.core.do_kill = True
def restart(self):
- """Untested"""
- self.core.do_restart = True
+ """Not working, not likely to ever will"""
+ pass
+ #self.core.do_restart = True
def getLog(self, offset=0):
"""Returns most recent log entries.
diff --git a/module/InitHomeDir.py b/module/InitHomeDir.py
index 9a0fb60d8..156c9f932 100644
--- a/module/InitHomeDir.py
+++ b/module/InitHomeDir.py
@@ -25,6 +25,7 @@ import sys
from sys import argv, platform
import __builtin__
+__builtin__.owd = path.abspath("") #original working directory
__builtin__.pypath = path.abspath(path.join(__file__, "..", ".."))
sys.path.append(join(pypath, "module", "lib"))
diff --git a/pyLoadCore.py b/pyLoadCore.py
index d4475e247..13bfe2d12 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -30,7 +30,7 @@ from imp import find_module
import logging
import logging.handlers
import os
-from os import _exit, execv, getcwd, makedirs, remove, sep, walk
+from os import _exit, execl, getcwd, makedirs, remove, sep, walk, chdir
from os.path import exists, join
import signal
import subprocess
@@ -535,7 +535,9 @@ class Core(object):
def restart(self):
self.shutdown()
- execv(executable, [executable, "pyLoadCore.py"])
+ chdir(owd)
+ execl(executable, executable, *sys.argv)
+ _exit(0)
def shutdown(self):
self.log.info(_("shutting down..."))