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();