Commit 91e065ec by Serge Hallyn Committed by Stéphane Graber

remove redundant, too-early call to clearenv in api_start call.

Ok, took a look, what happened was the clearenv calls used to be in lxc_start and lxccontainer and lxc_execute (do lxc_start() callers) themselves. I moved those into do_start(), but the calls in lxccontainer.c were never removed. They should simply be removed altogether. Trivial patch follows. Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent daaf41b3
...@@ -369,21 +369,6 @@ static bool lxcapi_start(struct lxc_container *c, int useinit, char * const argv ...@@ -369,21 +369,6 @@ static bool lxcapi_start(struct lxc_container *c, int useinit, char * const argv
setsid(); setsid();
} }
if (clearenv()) {
SYSERROR("failed to clear environment");
/* don't error out though */
}
if (putenv("container=lxc")) {
fprintf(stderr, "failed to set environment variable");
if (daemonize) {
lxc_container_put(c);
exit(1);
} else {
return false;
}
}
reboot: reboot:
conf->reboot = 0; conf->reboot = 0;
ret = lxc_start(c->name, argv, conf, c->config_path); ret = lxc_start(c->name, argv, conf, c->config_path);
......
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