Skip to content

Commit

Permalink
Clone file descriptors to avoid to close them.
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentbernat committed Aug 17, 2011
1 parent 1b53634 commit 7152fcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jchroot.c
Expand Up @@ -215,7 +215,7 @@ static int step1(struct config *config) {
if (config->hostname) flags |= CLONE_NEWUTS;
pid = clone(step2,
stack,
SIGCHLD | flags,
SIGCHLD | flags | CLONE_FILES,
config);
if (pid < 0) {
fprintf(stderr, "failed to clone: %m\n");
Expand Down

0 comments on commit 7152fcf

Please sign in to comment.