|
@@ -1,5 +1,6 @@
|
|
|
import subprocess
|
|
|
import sys
|
|
|
+import os
|
|
|
|
|
|
# sys.executable to use the same Python interpreter used to invoke this command
|
|
|
if len(sys.argv) < 2:
|
|
@@ -7,12 +8,9 @@ if len(sys.argv) < 2:
|
|
|
else:
|
|
|
port = sys.argv[1]
|
|
|
|
|
|
-subprocess.check_call([sys.executable, "-m", "sccd.compiler.sccdc", "-p", "threads", "server.xml"], cwd="hybrid_server")
|
|
|
-subprocess.call([sys.executable, "run_mvk_server.py", port], cwd="hybrid_server")
|
|
|
+os.chdir("hybrid_server")
|
|
|
+subprocess.check_call([sys.executable, "-m", "sccd.compiler.sccdc", "-p", "threads", "server.xml"])
|
|
|
+os.execv(sys.executable, [sys.executable, "run_mvk_server.py", port])
|
|
|
|
|
|
-# Write to /tmp/stdout
|
|
|
-#subprocess.call([sys.executable, "run_mvk_server.py", port], cwd="hybrid_server", stdout=open("/tmp/stdout", "w"))
|
|
|
-
|
|
|
-# Additional ways of calling...
|
|
|
-#subprocess.call([sys.executable, "run_mvk_server.py", port] + ["--kernel=baseline-jit"], cwd="hybrid_server")
|
|
|
-#subprocess.call([sys.executable, "-m", "cProfile", "-s", "tottime", "run_mvk_server.py", port], cwd="hybrid_server", stdout=open("/tmp/stdout", 'w'), stderr=open("/tmp/stderr", "w"))
|
|
|
+# Alternative execution modes
|
|
|
+#os.execv(sys.executable, [sys.executable, "-m", "cProfile", "-s", "tottime", "run_mvk_server.py", port])
|