aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/sys/rfork.2
diff options
context:
space:
mode:
authorMatthew Dillon <dillon@FreeBSD.org>2000-07-25 18:50:22 +0000
committerMatthew Dillon <dillon@FreeBSD.org>2000-07-25 18:50:22 +0000
commit01ba8e704f1582d401c094934ae111412393914f (patch)
treebc1a056703626d77116cedfd4f78508545c26390 /lib/libc/sys/rfork.2
parent54e53ebda75a5bc6d5b3d082b8a0cf905a6a600f (diff)
Notes
Diffstat (limited to 'lib/libc/sys/rfork.2')
-rw-r--r--lib/libc/sys/rfork.227
1 files changed, 21 insertions, 6 deletions
diff --git a/lib/libc/sys/rfork.2 b/lib/libc/sys/rfork.2
index 520b8139e1722..60f906ebb3ab7 100644
--- a/lib/libc/sys/rfork.2
+++ b/lib/libc/sys/rfork.2
@@ -54,13 +54,16 @@ If set, the new process starts with a clean file descriptor table.
Is mutually exclusive with
.Dv RFFDG .
.It RFMEM
-If set, the kernel will force sharing of the entire address space.
+If set, the kernel will force sharing of the entire address space,
+typically by sharing the hardawre page table directly.
The child
-will then inherit all the shared segments the parent process owns.
-Other segment
-types will be unaffected. Subsequent forks by the parent will then
-propagate the shared data and bss between children. The stack segment
-is always split. May be set only with
+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.
+May be set only with
.Dv RFPROC .
.It RFSIGSHARE
If set, the kernel will force sharing the sigacts structure between the
@@ -143,6 +146,18 @@ There is insufficient swap space for the new process.
.Xr intro 2 ,
.Xr minherit 2 ,
.Xr vfork 2
+.Sh BUGS
+FreeBSD does not yet implement a native
+.Fn clone
+library call, and the current pthreads implementation does not use
+.Fn
+rfork
+with RFMEM. A native port of the linux threads library,
+.Pa /usr/ports/devel/linuxthreads ,
+contains a working
+.Fn
+clone
+call that utilizes RFMEM.
.Sh HISTORY
The
.Fn rfork