diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libc/sys/fork.2 | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/libc/sys/fork.2 b/lib/libc/sys/fork.2 index 805b7fa923f..422ba2db2ac 100644 --- a/lib/libc/sys/fork.2 +++ b/lib/libc/sys/fork.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: fork.2,v 1.14 2002/04/29 01:41:45 simonb Exp $ +.\" $NetBSD: fork.2,v 1.15 2002/08/11 10:35:48 yamt Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -33,7 +33,7 @@ .\" .\" @(#)fork.2 8.1 (Berkeley) 6/4/93 .\" -.Dd June 4, 1993 +.Dd August 11, 2002 .Dt FORK 2 .Os .Sh NAME @@ -75,6 +75,18 @@ The child process' resource utilizations are set to 0; see .Xr setrlimit 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 |
