Module Name: src
Committed By: kamil
Date: Tue May 12 11:21:10 UTC 2020
Modified Files:
src/sys/kern: kern_fork.c
src/sys/sys: sched.h
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.224 -r1.225 src/sys/kern/kern_fork.c
cvs rdiff -u -r1.88 -r1.89 src/sys/sys/sched.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/kern_fork.c
diff -u src/sys/kern/kern_fork.c:1.224 src/sys/kern/kern_fork.c:1.225
--- src/sys/kern/kern_fork.c:1.224 Thu May 7 20:02:34 2020
+++ src/sys/kern/kern_fork.c Tue May 12 11:21:09 2020
@@ -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 @@ sys___clone(struct lwp *l, const struct
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;
/*
Index: src/sys/sys/sched.h
diff -u src/sys/sys/sched.h:1.88 src/sys/sys/sched.h:1.89
--- src/sys/sys/sched.h:1.88 Sat Mar 14 18:08:39 2020
+++ src/sys/sys/sched.h Tue May 12 11:21:09 2020
@@ -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 @@ struct schedstate_percpu {
#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