From: Christian Brauner Date: Thu, 24 May 2018 22:25:16 +0000 (+0200) Subject: start: log setns() failure X-Git-Tag: lxc-3.1.0~290^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0b48eff1731a20dec8cb3f57acd08aca90c15dc;p=thirdparty%2Flxc.git start: log setns() failure Signed-off-by: Christian Brauner --- diff --git a/src/lxc/start.c b/src/lxc/start.c index ba737d239..638e195d6 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1486,8 +1486,16 @@ static inline int do_share_ns(void *arg) continue; ret = setns(handler->nsfd[i], 0); - if (ret < 0) + if (ret < 0) { + /* + * Note that joining a user and/or mount namespace + * requires the process is not multithreaded otherwise + * setns() will fail here. + */ + SYSERROR("Failed to inherit %s namespace", + ns_info[i].proc_name); return -1; + } DEBUG("Inherited %s namespace", ns_info[i].proc_name); }