diff options
author | Garrett Wollman <wollman@FreeBSD.org> | 2002-09-06 19:23:28 +0000 |
---|---|---|
committer | Garrett Wollman <wollman@FreeBSD.org> | 2002-09-06 19:23:28 +0000 |
commit | 2c5db8c62d3f64e011ca567fd3c59e07ab295690 (patch) | |
tree | ab253f97e2e697b776a8effe176e15455cf1d674 /lib/libc/stdlib/atexit.3 | |
parent | 99b57e408b9245a9b56e47f99749144838cfedcb (diff) | |
download | src-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/atexit.3')
-rw-r--r-- | lib/libc/stdlib/atexit.3 | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/libc/stdlib/atexit.3 b/lib/libc/stdlib/atexit.3 index 7bb1ff6b7085..cc434ccdedf7 100644 --- a/lib/libc/stdlib/atexit.3 +++ b/lib/libc/stdlib/atexit.3 @@ -36,7 +36,7 @@ .\" @(#)atexit.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd September 6, 2002 .Dt ATEXIT 3 .Os .Sh NAME @@ -60,8 +60,19 @@ or via return from the program's .Em main . Functions so registered are called in reverse order; no arguments are passed. +.Pp +These functions must not call +.Fn exit ; +if it should be necessary to terminate the process while in such a +function, the +.Xr _exit 2 +function should be used. (Alternatively, the function may cause abnormal +process termination, for example by calling +.Xr abort 3 . ) +.Pp At least 32 functions can always be registered, and more are allowed as long as sufficient memory can be allocated. +.\" XXX {ATEXIT_MAX} is not implemented yet .Sh RETURN VALUES .Rv -std atexit .Sh ERRORS |