summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/sys/rfork.215
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/libc/sys/rfork.2 b/lib/libc/sys/rfork.2
index 60f906e..ec53699 100644
--- a/lib/libc/sys/rfork.2
+++ b/lib/libc/sys/rfork.2
@@ -61,10 +61,14 @@ will thus inherit and share all the segments the parent process owns,
whether they are normally shareable or not. The stack segment is
not split (both the parent and child return on the same stack) and thus
.Fn rfork
-with the RFMEM flag may not generally be called directly from a high level
-language. For example, you may not call it directly from C.
+with the RFMEM flag may not generally be called directly from high level
+languages including C.
May be set only with
.Dv RFPROC .
+A helper function is provided to assist with this problem and will cause
+the new process to run on the provided stack. See
+.Fn rfork_thread 3
+for information.
.It RFSIGSHARE
If set, the kernel will force sharing the sigacts structure between the
child and the parent.
@@ -145,7 +149,8 @@ There is insufficient swap space for the new process.
.Xr fork 2 ,
.Xr intro 2 ,
.Xr minherit 2 ,
-.Xr vfork 2
+.Xr vfork 2 ,
+.Xr rfork_thread 3
.Sh BUGS
FreeBSD does not yet implement a native
.Fn clone
@@ -158,6 +163,10 @@ contains a working
.Fn
clone
call that utilizes RFMEM.
+The
+.Fn rfork_thread
+library call can often be used instead of
+.Fn clone .
.Sh HISTORY
The
.Fn rfork
OpenPOWER on IntegriCloud