Skip to content

Commit

Permalink
start: log setns() failure
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed May 24, 2018
1 parent 8f3e3c1 commit c0b48ef
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/lxc/start.c
Expand Up @@ -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);
}
Expand Down

0 comments on commit c0b48ef

Please sign in to comment.