diff options
-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 |