Loading...
--- Libc/Libc-498/stdlib/atexit.3
+++ Libc/Libc-262/stdlib/atexit.3
@@ -34,9 +34,9 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)atexit.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/stdlib/atexit.3,v 1.10 2002/12/18 13:33:03 ru Exp $
+.\" $FreeBSD: src/lib/libc/stdlib/atexit.3,v 1.7 2001/09/07 14:46:35 asmodai Exp $
.\"
-.Dd September 6, 2002
+.Dd June 4, 1993
.Dt ATEXIT 3
.Os
.Sh NAME
@@ -47,33 +47,21 @@
.Sh SYNOPSIS
.In stdlib.h
.Ft int
-.Fn atexit "void (*func)(void)"
+.Fn atexit "void (*function)(void)"
.Sh DESCRIPTION
The
.Fn atexit
function
-registers the function
-.Fa func
+registers the given
+.Ar function
to be called at program exit, whether via
.Xr exit 3
or via return from the program's
-.Fn main .
+.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;
-more are allowed as long as sufficient memory can be allocated.
-.\" XXX {ATEXIT_MAX} is not implemented yet
+At least 32 functions can always be registered,
+and more are allowed as long as sufficient memory can be allocated.
.Sh RETURN VALUES
.Rv -std atexit
.Sh ERRORS