From 91e065ec331416b9d0941da86792bdbc8f10fadf Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Tue, 19 Feb 2013 14:39:31 -0600 Subject: [PATCH] remove redundant, too-early call to clearenv in api_start call. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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: Serge Hallyn Acked-by: Stéphane Graber --- src/lxc/lxccontainer.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index f24c39f18..bcfc8b61a 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -369,21 +369,6 @@ static bool lxcapi_start(struct lxc_container *c, int useinit, char * const argv 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: conf->reboot = 0; ret = lxc_start(c->name, argv, conf, c->config_path); -- 2.47.2