提交 5c79f3b4 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!24 add -ti for exec params

Merge pull request !24 from gaohuatao/ght_master
......@@ -271,6 +271,9 @@ struct lcr_exec_request {
int64_t timeout;
const char *suffix;
bool tty;
bool open_stdin;
};
/*
* Execute process inside a container
......
......@@ -599,6 +599,13 @@ static void execute_lxc_attach(const char *name, const char *path, const struct
add_array_kv(params, args_len, &i, "--suffix", request->suffix);
if (!request->tty) {
add_array_elem(params, PARAM_NUM, &i, "--disable-pty");
}
if (request->open_stdin) {
add_array_elem(params, PARAM_NUM, &i, "--open-stdin");
}
add_array_elem(params, args_len, &i, "--");
for (j = 0; j < request->args_len; j++) {
add_array_elem(params, args_len, &i, request->args[j]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册