conf: make is_execute a boolean

parent 1aa52fc6
...@@ -214,10 +214,10 @@ struct lxc_state_client { ...@@ -214,10 +214,10 @@ struct lxc_state_client {
struct lxc_conf { struct lxc_conf {
/* Pointer to the name of the container. Do not free! */ /* Pointer to the name of the container. Do not free! */
const char *name; const char *name;
int is_execute;
char *fstab; char *fstab;
unsigned int tty; unsigned int tty;
unsigned int pts; unsigned int pts;
bool is_execute;
int reboot; int reboot;
signed long personality; signed long personality;
struct utsname *utsname; struct utsname *utsname;
......
...@@ -152,7 +152,7 @@ int lxc_execute(const char *name, char *const argv[], int quiet, ...@@ -152,7 +152,7 @@ int lxc_execute(const char *name, char *const argv[], int quiet,
struct execute_args args = {.argv = argv, .quiet = quiet}; struct execute_args args = {.argv = argv, .quiet = quiet};
TRACE("Doing lxc_execute"); TRACE("Doing lxc_execute");
handler->conf->is_execute = 1; handler->conf->is_execute = true;
return __lxc_start(name, handler, &execute_start_ops, &args, lxcpath, return __lxc_start(name, handler, &execute_start_ops, &args, lxcpath,
backgrounded, error_num); backgrounded, error_num);
} }
...@@ -1247,7 +1247,7 @@ static int do_start(void *data) ...@@ -1247,7 +1247,7 @@ static int do_start(void *data)
* make sure that that pty is stdin,stdout,stderr. * make sure that that pty is stdin,stdout,stderr.
*/ */
if (handler->conf->console.slave >= 0) { if (handler->conf->console.slave >= 0) {
if (handler->backgrounded || handler->conf->is_execute == 0) if (handler->backgrounded || !handler->conf->is_execute)
ret = set_stdfds(handler->conf->console.slave); ret = set_stdfds(handler->conf->console.slave);
else else
ret = lxc_terminal_set_stdfds(handler->conf->console.slave); ret = lxc_terminal_set_stdfds(handler->conf->console.slave);
......
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