Page MenuHomeFreeBSD

D55306.diff
No OneTemporary

D55306.diff

diff --git a/lib/libsys/pdfork.2 b/lib/libsys/pdfork.2
--- a/lib/libsys/pdfork.2
+++ b/lib/libsys/pdfork.2
@@ -114,11 +114,13 @@
flags.
The
.Fn pdrfork
-system call requires that the
+system call requires that both the
.Va RFPROC
-or
+and
+.Va RFPROCDESC
+flags, or
.Va RFSPAWN
-flag is specified.
+flag are specified.
.Pp
.Fn pdgetpid
queries the process ID (PID) in the process descriptor
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -214,6 +214,11 @@
fr.fr_flags = RFFDG | RFPROC | RFPPWAIT | RFMEM | RFPROCDESC;
fr.fr_flags2 = FR2_DROPSIG_CAUGHT;
} else {
+ if ((uap->rfflags & (RFPROC | RFPROCDESC)) !=
+ (RFPROC | RFPROCDESC)) {
+ return (EXTERROR(EINVAL,
+ "RFPROC|RFPROCDESC required %#jx", uap->rfflags));
+ }
fr.fr_flags = uap->rfflags;
}

File Metadata

Mime Type
text/plain
Expires
Tue, Aug 4, 7:39 AM (3 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35951523
Default Alt Text
D55306.diff (857 B)

Event Timeline