]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Remove CLONE_DETACHED
authorAndrew Morton <akpm@osdl.org>
Mon, 19 Jan 2004 13:15:48 +0000 (05:15 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 19 Jan 2004 13:15:48 +0000 (05:15 -0800)
From: Andries.Brouwer@cwi.nl

Remove obsolete CLONE_DETACHED

include/linux/sched.h
kernel/fork.c

index dba09fa98441dd856fc932942bb1436ae0a4aeae..f5f84aedbaec7e79f5c3239fade71bc56a30d6ec 100644 (file)
@@ -50,7 +50,7 @@ struct exec_domain;
 #define CLONE_SETTLS   0x00080000      /* create a new TLS for the child */
 #define CLONE_PARENT_SETTID    0x00100000      /* set the TID in the parent */
 #define CLONE_CHILD_CLEARTID   0x00200000      /* clear the TID in the child */
-#define CLONE_DETACHED         0x00400000      /* Not used - CLONE_THREAD implies detached uniquely */
+#define CLONE_DETACHED         0x00400000      /* Unused, ignored */
 #define CLONE_UNTRACED         0x00800000      /* set if the tracing process can't force CLONE_PTRACE on this clone */
 #define CLONE_CHILD_SETTID     0x01000000      /* set the TID in the child */
 #define CLONE_STOPPED          0x02000000      /* Start in stopped state */
index ea2eeb1ed644cfa6c11d38ce23b0f0e8c6f2f4fd..b703d95dadc778cca8fdd1ea44b813585f64fc8f 100644 (file)
@@ -859,22 +859,6 @@ struct task_struct *copy_process(unsigned long clone_flags,
        if ((clone_flags & CLONE_SIGHAND) && !(clone_flags & CLONE_VM))
                return ERR_PTR(-EINVAL);
 
-       /*
-        * CLONE_DETACHED must match CLONE_THREAD: it's a historical
-        * thing.
-        */
-       if (!(clone_flags & CLONE_DETACHED) != !(clone_flags & CLONE_THREAD)) {
-               /* Warn about the old no longer supported case so that we see it */
-               if (clone_flags & CLONE_THREAD) {
-                       static int count;
-                       if (count < 5) {
-                               count++;
-                               printk(KERN_WARNING "%s trying to use CLONE_THREAD without CLONE_DETACH\n", current->comm);
-                       }
-               }
-               return ERR_PTR(-EINVAL);
-       }
-
        retval = security_task_create(clone_flags);
        if (retval)
                goto fork_out;