Skip to content

Commit

Permalink
preserve inherited fds for stop hook
Browse files Browse the repository at this point in the history
When preserving fds for the stop hook, make sure to also save
any fds we've inherited.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
  • Loading branch information
hallyn committed Jan 12, 2016
1 parent ffe3443 commit 330cbe3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lxc/start.c
Expand Up @@ -1068,7 +1068,7 @@ static int lxc_spawn(struct lxc_handler *handler)
goto out_delete_net;
}

if (!preserve_ns(handler->nsfd, handler->clone_flags, handler->pid, &errmsg)) {
if (!preserve_ns(handler->nsfd, handler->clone_flags | preserve_mask, handler->pid, &errmsg)) {
INFO("Failed to store namespace references for stop hook: %s",
errmsg ? errmsg : "(Out of memory)");
free(errmsg);
Expand Down

0 comments on commit 330cbe3

Please sign in to comment.