aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/exit.3
diff options
context:
space:
mode:
authorGarrett Wollman <wollman@FreeBSD.org>2002-09-06 19:23:28 +0000
committerGarrett Wollman <wollman@FreeBSD.org>2002-09-06 19:23:28 +0000
commit2c5db8c62d3f64e011ca567fd3c59e07ab295690 (patch)
treeab253f97e2e697b776a8effe176e15455cf1d674 /lib/libc/stdlib/exit.3
parent99b57e408b9245a9b56e47f99749144838cfedcb (diff)
downloadsrc-2c5db8c62d3f64e011ca567fd3c59e07ab295690.tar.gz
src-2c5db8c62d3f64e011ca567fd3c59e07ab295690.zip
Include some verbage about not calling exit() from functions registered
by atexit().
Notes
Notes: svn path=/head/; revision=103036
Diffstat (limited to 'lib/libc/stdlib/exit.3')
-rw-r--r--lib/libc/stdlib/exit.313
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/libc/stdlib/exit.3 b/lib/libc/stdlib/exit.3
index f94d199dcd73..bbe0d1faee32 100644
--- a/lib/libc/stdlib/exit.3
+++ b/lib/libc/stdlib/exit.3
@@ -36,7 +36,7 @@
.\" @(#)exit.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd June 4, 1993
+.Dd September 6, 2002
.Dt EXIT 3
.Os
.Sh NAME
@@ -79,6 +79,17 @@ and
If portability is not a concern, you may
use the values described in
.Xr sysexits 3 .
+.Pp
+Note that
+.Fn exit
+does nothing to prevent bottomless recursion should a function registered
+using
+.Xr atexit 3
+itself call
+.Fn exit .
+Such functions should call
+.Xr _exit 2
+instead (although this has other effects as well which may not be desired).
.Sh RETURN VALUES
The
.Fn exit