diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-07-24 22:00:12 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-07-24 22:00:12 +0000 |
commit | daa40394b13350869f289004e8c7062312c66ce5 (patch) | |
tree | 263e34883cfbc2a3d098cf6abd2557d19131ec38 /lib/libc/sys | |
parent | 163964bf521661038efecb077e55b036d1f9eb3c (diff) |
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/sys')
-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 |