Nucleus
Barry Fixed scheduler double-schedule bug 6063f66 (3 years, 2 months ago)
diff --git a/task/clone.c b/task/clone.c
index 7516f18..fe0ad88 100644
--- a/task/clone.c
+++ b/task/clone.c
@@ -20,6 +20,11 @@ clone(int flags)
Task *parent = current, *child = new(&taskType), *tmp;
pid_t tid = 0;
+ if (flags & CLONE_THREAD) {
+ flags |= CLONE_PARENT;
+ flags |= CLONE_VM;
+ }
+
/* Clone parent's file system namespace */
if (flags & CLONE_FS)
child->fs = get(parent->fs);