[lxc-devel] [lxc/master] Fix issue #538
lifeng68 on Github
lxc-bot at linuxcontainers.org
Thu Sep 28 08:18:23 UTC 2017
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 403 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170928/de1bdb5e/attachment.bin>
-------------- next part --------------
From e30756bc3519b64e9b165e34415fbefc12365f6d Mon Sep 17 00:00:00 2001
From: LiFeng <lifeng68 at huawei.com>
Date: Fri, 29 Sep 2017 00:23:30 +0800
Subject: [PATCH] Fix issue #538 Do not close the inherit namespace fds
Signed-off-by: LiFeng <lifeng68 at huawei.com>
---
src/lxc/start.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/lxc/start.c b/src/lxc/start.c
index 3baed693a..a33b81d38 100644
--- a/src/lxc/start.c
+++ b/src/lxc/start.c
@@ -236,6 +236,15 @@ int lxc_check_inherited(struct lxc_conf *conf, bool closeall,
(i < len_fds && fd == fds_to_ignore[i]))
continue;
+ if (conf) {
+ for (i = 0; i < LXC_NS_MAX; i++)
+ if (conf->inherit_ns_fd[i] == fd)
+ break;
+ }
+
+ if (i < LXC_NS_MAX)
+ continue;
+
if (current_config && fd == current_config->logfd)
continue;
More information about the lxc-devel
mailing list