From: Christian Brauner Date: Sat, 24 Feb 2018 14:21:38 +0000 (+0100) Subject: lxccontainer: do_lxcapi_want_close_all_fds() X-Git-Tag: lxc-2.0.10~214 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=642da155f692dd216a368c37d0768e021e6f91b5;p=thirdparty%2Flxc.git lxccontainer: do_lxcapi_want_close_all_fds() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 6bc1a7e25..1691a1d6d 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -627,12 +627,13 @@ static bool do_lxcapi_want_close_all_fds(struct lxc_container *c, bool state) { if (!c || !c->lxc_conf) return false; - if (container_mem_lock(c)) { - ERROR("Error getting mem lock"); + + if (container_mem_lock(c)) return false; - } + c->lxc_conf->close_all_fds = state; container_mem_unlock(c); + return true; }