diff options
author | 2002-07-24 22:00:11 +0000 | |
---|---|---|
committer | 2002-07-24 22:00:11 +0000 | |
commit | 80a929f0875446df2adce07bbbfa9e3b85682578 (patch) | |
tree | cdfbe4c98cf8a797e202fb81bcf7d428c8936816 /lib/libc | |
parent | better uid/gid tracking; okay deraadt@ (diff) | |
download | wireguard-openbsd-80a929f0875446df2adce07bbbfa9e3b85682578.tar.xz wireguard-openbsd-80a929f0875446df2adce07bbbfa9e3b85682578.zip |
o Mention that interval timers are cleared (FreeBSD)
o Mention that _exit(2) should be used to avoid problems with
stdio buffers and atexit(3)
o Add STANDARDS section
OK deraadt@
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/sys/fork.2 | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/libc/sys/fork.2 b/lib/libc/sys/fork.2 index 1f9c0c6da3b..6b09886246b 100644 --- a/lib/libc/sys/fork.2 +++ b/lib/libc/sys/fork.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fork.2,v 1.11 2002/01/24 21:18:36 mickey Exp $ +.\" $OpenBSD: fork.2,v 1.12 2002/07/24 22:00:11 millert Exp $ .\" $NetBSD: fork.2,v 1.6 1995/02/27 12:32:36 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -74,7 +74,22 @@ as well as to set up pipes. The child process' resource utilizations are set to 0; see .Xr setrlimit 2 . +.It +All interval timers are cleared; see +.Xr setitimer 2 . .El +.Pp +In general, the child process should call +.Xr _exit 2 +rather than +.Xr exit 3 . +Otherwise, any stdio buffers that exist both in the parent and child +will be flushed twice. +Similarly, +.Xr _exit 2 +should be used to prevent +.Xr atexit 3 +routines from being called twice (once in the parent and once in the child). .Sh RETURN VALUES Upon successful completion, .Fn fork @@ -105,6 +120,11 @@ There is insufficient swap space for the new process. .Xr execve 2 , .Xr setrlimit 2 , .Xr wait 2 +.Sh STANDARDS +The +.Fn fork +function conforms to +.St -p1003.1-90 . .Sh HISTORY A .Fn fork |