Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Remove the stub support of CLONE_PID in clone(2)



details:   https://anonhg.NetBSD.org/src/rev/8ea91ce17718
branches:  trunk
changeset: 1010033:8ea91ce17718
user:      kamil <kamil%NetBSD.org@localhost>
date:      Tue May 12 11:21:09 2020 +0000

description:
Remove the stub support of CLONE_PID in clone(2)

CLONE_PID causes the child clonee to share the same process id as cloner.

It was implemented for debugging purposes in the Linux kernel 2.0,
restricted to root only in 2.3.21 and removed from Linux 2.5.16.

The CLONE_PID bit was recycled for CLONE_PIDFD in Linux 5.2.

diffstat:

 sys/kern/kern_fork.c |  8 ++++----
 sys/sys/sched.h      |  3 +--
 2 files changed, 5 insertions(+), 6 deletions(-)

diffs (47 lines):

diff -r 61e7b5cef2cd -r 8ea91ce17718 sys/kern/kern_fork.c
--- a/sys/kern/kern_fork.c      Tue May 12 10:37:10 2020 +0000
+++ b/sys/kern/kern_fork.c      Tue May 12 11:21:09 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_fork.c,v 1.224 2020/05/07 20:02:34 kamil Exp $    */
+/*     $NetBSD: kern_fork.c,v 1.225 2020/05/12 11:21:09 kamil Exp $    */
 
 /*-
  * Copyright (c) 1999, 2001, 2004, 2006, 2007, 2008, 2019
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_fork.c,v 1.224 2020/05/07 20:02:34 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_fork.c,v 1.225 2020/05/12 11:21:09 kamil Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_dtrace.h"
@@ -158,9 +158,9 @@
        int flags, sig;
 
        /*
-        * We don't support the CLONE_PID or CLONE_PTRACE flags.
+        * We don't support the CLONE_PTRACE flag.
         */
-       if (SCARG(uap, flags) & (CLONE_PID|CLONE_PTRACE))
+       if (SCARG(uap, flags) & (CLONE_PTRACE))
                return EINVAL;
 
        /*
diff -r 61e7b5cef2cd -r 8ea91ce17718 sys/sys/sched.h
--- a/sys/sys/sched.h   Tue May 12 10:37:10 2020 +0000
+++ b/sys/sys/sched.h   Tue May 12 11:21:09 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sched.h,v 1.88 2020/03/14 18:08:39 ad Exp $    */
+/*     $NetBSD: sched.h,v 1.89 2020/05/12 11:21:09 kamil Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2007, 2008, 2019, 2020
@@ -200,7 +200,6 @@
 #define        CLONE_FS                0x00000200      /* share "file system" info */
 #define        CLONE_FILES             0x00000400      /* share file descriptors */
 #define        CLONE_SIGHAND           0x00000800      /* share signal actions */
-#define        CLONE_PID               0x00001000      /* share process ID */
 #define        CLONE_PTRACE            0x00002000      /* ptrace(2) continues on
                                                   child */
 #define        CLONE_VFORK             0x00004000      /* parent blocks until child



Home | Main Index | Thread Index | Old Index