Commit 575ea467 by LiFeng

start: __lxc_start return -1 when start fails

Signed-off-by: 's avatarLiFeng <lifeng68@huawei.com>
parent bd72001f
...@@ -1940,16 +1940,19 @@ int __lxc_start(const char *name, struct lxc_handler *handler, ...@@ -1940,16 +1940,19 @@ int __lxc_start(const char *name, struct lxc_handler *handler,
if (!attach_block_device(handler->conf)) { if (!attach_block_device(handler->conf)) {
ERROR("Failed to attach block device"); ERROR("Failed to attach block device");
ret = -1;
goto out_fini_nonet; goto out_fini_nonet;
} }
if (!cgroup_ops->monitor_create(cgroup_ops, handler)) { if (!cgroup_ops->monitor_create(cgroup_ops, handler)) {
ERROR("Failed to create monitor cgroup"); ERROR("Failed to create monitor cgroup");
ret = -1;
goto out_fini_nonet; goto out_fini_nonet;
} }
if (!cgroup_ops->monitor_enter(cgroup_ops, handler->monitor_pid)) { if (!cgroup_ops->monitor_enter(cgroup_ops, handler->monitor_pid)) {
ERROR("Failed to enter monitor cgroup"); ERROR("Failed to enter monitor cgroup");
ret = -1;
goto out_fini_nonet; goto out_fini_nonet;
} }
...@@ -1994,6 +1997,7 @@ int __lxc_start(const char *name, struct lxc_handler *handler, ...@@ -1994,6 +1997,7 @@ int __lxc_start(const char *name, struct lxc_handler *handler,
if (!handler->init_died && handler->pid > 0) { if (!handler->init_died && handler->pid > 0) {
ERROR("Child process is not killed"); ERROR("Child process is not killed");
ret = -1;
goto out_abort; goto out_abort;
} }
......
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