Commit c374e422 by Dongsheng Yang Committed by Stéphane Graber

lxc_start: ERROR if container is already running.

We should exit with a error when starting a running container. Signed-off-by: 's avatarDongsheng Yang <yangds.fnst@cn.fujitsu.com> Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
parent f5a49d03
...@@ -276,6 +276,10 @@ int main(int argc, char *argv[]) ...@@ -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 * 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() * unset c->lxc_conf for us and let us not use lxc_config_define_load()
......
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