Nucleus
Barry Virtual Memory Regions and namespace 381dc7b (3 years, 3 months ago)diff --git a/task/clone.c b/task/clone.c index c9a6dc0..0ec2f95 100644 --- a/task/clone.c +++ b/task/clone.c @@ -32,6 +32,12 @@ clone(int flags) else child->files = copy(parent->files); + /* Clone parent's virtual memory namespace */ + if (flags & CLONE_VM) + child->vm = get(parent->fs); + else + child->fs = copy(parent->fs); + /* After this, anything on the stack is desynchronised */ child->pageDir = clone_dir();