diff --git a/jchroot.c b/jchroot.c index 6d030ff..a5891f2 100644 --- a/jchroot.c +++ b/jchroot.c @@ -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");