BarryServer : Git

All the code for all my projects
// BarryServer : Git / Nucleus / commit / f0dcd5469d9d1ca1dd816f97411f1209eb5a287a / task / clone.c

// Related

Nucleus

Barry Files namespace f0dcd54 (3 years, 3 months ago)
diff --git a/task/clone.c b/task/clone.c
index 86cf440..4dd15e7 100644
--- a/task/clone.c
+++ b/task/clone.c
@@ -25,6 +25,12 @@ clone(int flags)
 	else
 		child->fs = copy(parent->fs);
 
+	/* Clone parent's files namespace */
+	if (flags & CLONE_FILES)
+		child->files = get(parent->files);
+	else
+		child->files = copy(parent->files);
+
 	/* After this, anything on the stack is desynchronised */
 	child->pageDir = clone_dir();