summaryrefslogtreecommitdiffstats
path: root/pyLoadCore.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-08-17 18:29:39 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-08-17 18:29:39 +0200
commit8d928c2b27f2f8344e3debe26ea72542fbfab124 (patch)
tree7b98ef66db71bdf80414989f1ac9ac09c9698fe6 /pyLoadCore.py
parentplugin unloading, closed #377, some fixes (diff)
downloadpyload-8d928c2b27f2f8344e3debe26ea72542fbfab124.tar.xz
not working restart method
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-xpyLoadCore.py6
1 files changed, 4 insertions, 2 deletions
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..."))