mirror of
https://github.com/clearlinux/hyperstart.git
synced 2026-08-26 09:35:49 +00:00
setup the exec env in hyper_do_exec_cmd()
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
This commit is contained in:
+8
-3
@@ -519,9 +519,8 @@ int hyper_enter_container(struct hyper_pod *pod,
|
||||
/* TODO: wait for container finishing setup root */
|
||||
chdir("/");
|
||||
|
||||
if (hyper_setup_env(c->exec.envs, c->exec.envs_num) < 0)
|
||||
goto out;
|
||||
ret = hyper_setup_env(exec->envs, exec->envs_num);
|
||||
// TODO: let the hyperd do it (merging the env) when needed.
|
||||
ret = hyper_setup_env(c->exec.envs, c->exec.envs_num);
|
||||
out:
|
||||
close(ipcns);
|
||||
close(utsns);
|
||||
@@ -596,6 +595,12 @@ static int hyper_do_exec_cmd(void *data)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
// set the container env
|
||||
if (hyper_setup_env(exec->envs, exec->envs_num) < 0) {
|
||||
fprintf(stderr, "setup env failed\n");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (hyper_dup_exec_tty(exec) < 0) {
|
||||
fprintf(stderr, "dup pts to exec stdio failed\n");
|
||||
goto exit;
|
||||
|
||||
Reference in New Issue
Block a user