chdir to the specific dir

Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
This commit is contained in:
Lai Jiangshan
2016-06-05 22:56:47 +08:00
parent 286e0f9c8f
commit 40f04580ec
+5
View File
@@ -586,6 +586,11 @@ static int hyper_do_exec_cmd(void *data)
goto exit;
}
if (exec->workdir && chdir(exec->workdir) < 0) {
perror("change work directory failed");
goto exit;
}
if (hyper_setup_exec_user(exec) < 0) {
fprintf(stderr, "setup exec user failed\n");
goto exit;