From: Dongsheng Yang Date: Fri, 12 Sep 2014 13:49:09 +0000 (+0800) Subject: lxc_start: ERROR if container is already running. X-Git-Tag: lxc-1.1.0.alpha3~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=312f9c5dfe165b2831a5ef9d085994e75fb6e7ac;p=thirdparty%2Flxc.git lxc_start: ERROR if container is already running. We should exit with a error when starting a running container. Signed-off-by: Dongsheng Yang Acked-by: Serge E. Hallyn --- diff --git a/src/lxc/lxc_start.c b/src/lxc/lxc_start.c index e836325fe..9a053567d 100644 --- a/src/lxc/lxc_start.c +++ b/src/lxc/lxc_start.c @@ -276,6 +276,10 @@ int main(int argc, char *argv[]) } } + if (c->is_running(c)) { + ERROR("Container is already running."); + goto out; + } /* * We should use set_config_item() over &defines, which would handle * unset c->lxc_conf for us and let us not use lxc_config_define_load()