summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2000-02-07 04:38:39 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2000-02-07 04:38:39 +0000
commit60e16faf91ab2f4925efb300156736fcdf645fef (patch)
tree71f03aa56d387cc39fe0eddef1b2d97c6ca3194d /share
parent9cb58b5d1bb06137a8552a30a9c607d75341500d (diff)
Update to reflect recent changes to the interface.
Diffstat (limited to 'share')
-rw-r--r--share/man/man9/fork1.979
1 files changed, 35 insertions, 44 deletions
diff --git a/share/man/man9/fork1.9 b/share/man/man9/fork1.9
index f0a22c2e6bb..f860967e48b 100644
--- a/share/man/man9/fork1.9
+++ b/share/man/man9/fork1.9
@@ -1,4 +1,4 @@
-.\" $OpenBSD: fork1.9,v 1.2 1999/09/05 16:23:11 espie Exp $
+.\" $OpenBSD: fork1.9,v 1.3 2000/02/07 04:38:38 art Exp $
.\" $NetBSD: fork1.9,v 1.3 1999/03/16 00:40:47 garbled Exp $
.\"
.\" Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
.Fd #include <sys/types.h>
.Fd #include <sys/proc.h>
.Ft int
-.Fn "fork1" "struct proc *p1" "int forktype" "int rforkflags" "void *stack" "size_t stacksize" "register_t *retval"
+.Fn "fork1" "struct proc *p1" "int flags" "void *stack" "size_t stacksize" "register_t *retval"
.Sh DESCRIPTION
.Fn fork1
creates a new process out of
@@ -60,52 +60,43 @@ system calls, as well as the
.Xr create_kthread 9
function.
.Pp
-The
-.Fa forktype
-argument can be
-.Dv ISFORK ,
-.Dv ISVFORK
-or
-.Dv ISRFORK
-and controls whether
-.Nm
-has
-.Xr fork 2 ,
+The
+.Ar flags
+argument is used to control the behavior of the fork and is created by
+a bitwise-OR of the following values:
+.Bl -tag -width FORK_SHAREFILES
+.It Dv FORK_FORK
+The call is done by the
+.Xr fork 2
+system call. Used only for statistics.
+.It Dv FORK_VFORK
+The call is done by the
.Xr vfork 2
-or
+system call. Used only for statistics.
+.It Dv FORK_RFORK
+The call is done by the
.Xr rfork 2
-semantics.
-.Pp
-The
-.Ar rforkflags
-argument is only used if
-.Fa forktype
-equals
-.Dv ISRFORK ,
-and is used to implement
-.Xr rfork 2
-semantics.
-.Bl -tag -width RFNOWAIT
-.It Dv RFPROC
-Should always be set. The system currently does not support changing an
-existing process characteristics.
-.It Dv RFNOWAIT
-See
-.Xr rfork 2 .
-.It Dv RFFDG
-If set, the child gets a copy of the parent's file descriptor table
-through
-.Xr fdcopy 9 .
-Otherwise, the file descriptor table is shared through
+system call. Used only for statistics.
+.It Dv FORK_PPWAIT
+Suspend the parent process until the child is terminated (by calling
+.Xr _exit 2
+or abnormally), or makes a call to
+.Xr execve 2 .
+.It Dv FORK_SHAREFILES
+Let the child share the file descriptor table with the parent through
.Xr fdshare 9 .
-.It Dv RFCFDG
-If set, the child starts out with a clean file descriptor table created
-by
+The default behavior is to copy the table through
+.Xr fdcopy 9 .
+.It Dv FORK_CLEANFILES
+The child starts with a clean file descriptor table created by
.Xr fdinit 9 .
-.It Dv RFMEM
-If set, the child will share the parent's address space, apart from the
-stack segment, which is always copied. Otherwise, the child will get a
-copy-on-write snapshot of the parent address space.
+.It Dv FORK_NOZOMBIE
+The child will be dissociated from the parent and will not leave a status
+for the parent to collect. See
+.Xr wait 2 .
+.It Dv FORK_SHAREVM
+The child will share the parent's address space. The default behavior is
+that the child gets a copy-on-write copy of the address space.
.El
.Pp
If