summaryrefslogtreecommitdiff
path: root/lib/libc/sys/rfork.2
diff options
context:
space:
mode:
authorMike Pritchard <mpp@FreeBSD.org>1997-01-12 00:38:36 +0000
committerMike Pritchard <mpp@FreeBSD.org>1997-01-12 00:38:36 +0000
commit9880dddc9e1e1a6a6aae61c9fc62235dfb1b6a39 (patch)
tree90aaba8b57f96154b6594ad2a7c5a9b92e206d48 /lib/libc/sys/rfork.2
parentaeea55e4594eff58688cdf3deb17dadce0315cfa (diff)
Notes
Diffstat (limited to 'lib/libc/sys/rfork.2')
-rw-r--r--lib/libc/sys/rfork.214
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/libc/sys/rfork.2 b/lib/libc/sys/rfork.2
index c41b89bf6588..1ba7b56581f5 100644
--- a/lib/libc/sys/rfork.2
+++ b/lib/libc/sys/rfork.2
@@ -14,7 +14,7 @@
.Ft int
.Fn rfork "int flags"
.Sh DESCRIPTION
-Forking, vforking or rforking is the only way new processes are created.
+Forking, vforking or rforking are the only ways new processes are created.
The
.Fa flags
argument to
@@ -28,7 +28,7 @@ the open file descriptor table (which, when shared, permits processes
to open and close files for other processes),
and open files.
.Fa Flags
-is the logical OR of some subset of
+is the logical OR of some subset of:
.Bl -tag -width "RFCNAMEG" -compact -offset indent
.It RFPROC
If set a new process is created; otherwise changes affect the
@@ -81,6 +81,16 @@ will sleep, if necessary, until required process resources are available.
can be implemented as a call to
.Fn rfork "RFFDG|RFPROC"
but isn't for backwards compatibility.
+.Sh RETURN VALUES
+Upon successful completion,
+.Fn rfork
+returns a value
+of 0 to the child process and returns the process ID of the child
+process to the parent process. Otherwise, a value of -1 is returned
+to the parent process, no child process is created, and the global
+variable
+.Va errno
+is set to indicate the error.
.Sh ERRORS
.Fn Rfork
will fail and no child process will be created if: