BarryServer : Git

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

// Related

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