From 8ce5870de372c3f15c4d34539e08305f70516139 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 19 Jan 2004 05:15:48 -0800 Subject: [PATCH] [PATCH] Remove CLONE_DETACHED From: Andries.Brouwer@cwi.nl Remove obsolete CLONE_DETACHED --- include/linux/sched.h | 2 +- kernel/fork.c | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index dba09fa98441d..f5f84aedbaec7 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -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 */ diff --git a/kernel/fork.c b/kernel/fork.c index ea2eeb1ed644c..b703d95dadc77 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -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; -- 2.53.0