diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-10-16 06:48:39 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-10-16 06:48:39 +0000 |
commit | 3f727c22b753ceb4d040d3a82e49e7c2b2da2407 (patch) | |
tree | 3dc79ede3e9884ead89b7cbfc417100fafbd2d91 | |
parent | ff335fced38faa98c385ddf09dccfb95bffe1825 (diff) |
stacksize argument is gone and replaced with tidptr argument
Document new FORK_TFORK bit and that stack argument is used by compat_linux
ok jmc@
-rw-r--r-- | share/man/man9/fork1.9 | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/share/man/man9/fork1.9 b/share/man/man9/fork1.9 index f82b02d94c8..77ad71ca573 100644 --- a/share/man/man9/fork1.9 +++ b/share/man/man9/fork1.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fork1.9,v 1.14 2010/06/29 17:54:12 tedu Exp $ +.\" $OpenBSD: fork1.9,v 1.15 2011/10/16 06:48:38 guenther Exp $ .\" $NetBSD: fork1.9,v 1.3 1999/03/16 00:40:47 garbled Exp $ .\" .\" Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: June 29 2010 $ +.Dd $Mdocdate: October 16 2011 $ .Dt FORK1 9 .Os .Sh NAME @@ -44,7 +44,7 @@ .Fa "int exitsig" .Fa "int flags" .Fa "void *stack" -.Fa "size_t stacksize" +.Fa "pid_t *tidptr" .Fa "void (*func)(void *)" .Fa "void *arg" .Fa "register_t *retval" @@ -83,6 +83,11 @@ The call is done by the .Xr rfork 2 system call. Used only for statistics. +.It Dv FORK_TFORK +The call is done by the +.Xr __tfork 2 +system call. +Used only for statistics. .It Dv FORK_PPWAIT Suspend the parent process until the child is terminated (by calling .Xr _exit 2 @@ -129,12 +134,17 @@ If .Fa stack is not .Dv NULL , -the area starting at -.Fa stack -of extent -.Fa stacksize -will be used for the child's stack, instead of cloning the parent's -stack. +it will be used as the initial value of the child's stack pointer, +instead of using the child's copy of the parent's stack. +.Pp +If +.Fa tidptr +is not +.Dv NULL , +the PID of the child process will be written there in the parent +on success. +This is guaranteed to be done before +the child process is started. .Pp If .Fa retval @@ -144,7 +154,7 @@ it will hold the following values after successful completion of the fork operation: .Bl -tag -width retval[0] .It Fa retval[0] -This will contain the pid of the child process. +This will contain the PID of the child process. .It Fa retval[1] In the parent process, this will contain the value 0. In the child process, this will contain 1. @@ -202,8 +212,8 @@ function semantics are specific to .Ox . Other BSD systems have different semantics. .Pp -The system never uses -.Fn fork1 -with a non-null -.Fa stack , -so that feature is not even tested. +The only use of a non-null +.Fa stack +is for +.Xr compat_linux 8 +on i386, so that feature is mostly untested. |