aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/sys/rfork.2
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2011-03-15 23:51:47 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2011-03-15 23:51:47 +0000
commitdd888c677bcb853cfcbdb304f2c9d19a2764acbf (patch)
tree67e42a66a29438a1d761d096060a31bd0d4da944 /lib/libc/sys/rfork.2
parent0cf90cd1d37e29407d1fc74e39da6a1625b7cede (diff)
downloadsrc-dd888c677bcb853cfcbdb304f2c9d19a2764acbf.tar.gz
src-dd888c677bcb853cfcbdb304f2c9d19a2764acbf.zip
rfork(2): Discourage rfork_thread-like approaches.
Calling rfork_thread(3) does not interoperate with pthreads and global state is not properly protected. Remove the BUGS section suggesting LinuxThreads entirely. With the current pthread library libthr, all threads are kernel-level entities so there seems little reason to use LinuxThreads.
Notes
Notes: svn path=/head/; revision=219682
Diffstat (limited to 'lib/libc/sys/rfork.2')
-rw-r--r--lib/libc/sys/rfork.220
1 files changed, 3 insertions, 17 deletions
diff --git a/lib/libc/sys/rfork.2 b/lib/libc/sys/rfork.2
index c0f264af9e6a..f1ae14b3ae44 100644
--- a/lib/libc/sys/rfork.2
+++ b/lib/libc/sys/rfork.2
@@ -5,7 +5,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 14, 2007
+.Dd March 15, 2011
.Dt RFORK 2
.Os
.Sh NAME
@@ -80,6 +80,7 @@ the new process to run on the provided stack.
See
.Xr rfork_thread 3
for information.
+Note that a lot of code will not run correctly in such an environment.
.It Dv RFSIGSHARE
If set, the kernel will force sharing the sigacts structure between the
child and the parent.
@@ -171,24 +172,9 @@ There is insufficient swap space for the new process.
.Xr intro 2 ,
.Xr minherit 2 ,
.Xr vfork 2 ,
+.Xr pthread_create 3 ,
.Xr rfork_thread 3
.Sh HISTORY
The
.Fn rfork
function first appeared in Plan9.
-.Sh BUGS
-.Fx
-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.
-The
-.Xr rfork_thread 3
-function can often be used instead of
-.Fn clone .