start: log setns() failure

parent 8f3e3c13
...@@ -1486,8 +1486,16 @@ static inline int do_share_ns(void *arg) ...@@ -1486,8 +1486,16 @@ static inline int do_share_ns(void *arg)
continue; continue;
ret = setns(handler->nsfd[i], 0); 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; return -1;
}
DEBUG("Inherited %s namespace", ns_info[i].proc_name); DEBUG("Inherited %s namespace", ns_info[i].proc_name);
} }
......
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