The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/3193

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Signed-off-by: LiFeng <lifen...@huawei.com>
From e2cb2e749f132db85ed09efd047d41c6f663790f Mon Sep 17 00:00:00 2001
From: LiFeng <lifen...@huawei.com>
Date: Wed, 27 Nov 2019 03:59:23 -0500
Subject: [PATCH] cgfsng: return attach fail if container stopped

Signed-off-by: LiFeng <lifen...@huawei.com>
---
 src/lxc/cgroups/cgfsng.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c
index 1e6a45cff2..2ea9cec034 100644
--- a/src/lxc/cgroups/cgfsng.c
+++ b/src/lxc/cgroups/cgfsng.c
@@ -2223,7 +2223,7 @@ __cgfsng_ops static bool cgfsng_attach(struct cgroup_ops 
*ops, const char *name,
                path = lxc_cmd_get_cgroup_path(name, lxcpath, 
h->controllers[0]);
                /* not running */
                if (!path)
-                       continue;
+                       return false;
 
                fullpath = build_full_cgpath_from_monitorpath(h, path, 
"cgroup.procs");
                ret = lxc_write_to_file(fullpath, pidstr, len, false, 0666);
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to