Unverified Commit 54ed2b93 authored by J-shang's avatar J-shang Committed by GitHub
Browse files

detached tuner process under windows (#3218)

parent f1013390
......@@ -170,7 +170,7 @@ class Experiment:
while True:
time.sleep(10)
status = self.get_status()
if status == 'STOPPED':
if status == 'DONE' or status == 'STOPPED':
return True
if status == 'ERROR':
return False
......
......@@ -344,16 +344,19 @@ function getTunerProc(command: string, stdio: StdioOptions, newCwd: string, newE
let cmd: string = command;
let arg: string[] = [];
let newShell: boolean = true;
let isDetached: boolean = false;
if (process.platform === "win32") {
cmd = command.split(" ", 1)[0];
arg = command.substr(cmd.length + 1).split(" ");
newShell = false;
isDetached = true;
}
const tunerProc: ChildProcess = spawn(cmd, arg, {
stdio,
cwd: newCwd,
env: newEnv,
shell: newShell
shell: newShell,
detached: isDetached
});
return tunerProc;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment