From 7152fcf472c5c529af5a5eeddad6c24abe3a24c5 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Wed, 17 Aug 2011 19:55:49 +0200 Subject: [PATCH] Clone file descriptors to avoid to close them. --- jchroot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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");