1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date. The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein. The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" References consulted:
24 .\" Linux libc source code
25 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
27 .\" Modified Mon Mar 29 22:36:52 1993, David Metcalfe
28 .\" Modified Sat Jul 24 21:40:02 1993, Rik Faith (faith@cs.unc.edu)
29 .\" Translated to German Sun Dec 29 1996 by Patrick Rother <krd@gulu.net>
31 .TH ATEXIT 3 "29. Dezember 1996" "GNU" "Bibliotheksfunktionen"
33 atexit \- lege eine Funktion fest, die bei Programmende aufgerufen wird
36 .B #include <stdlib.h>
38 .BI "int atexit(void (*" function )(void));
41 Die Funktion \fBatexit()\fP legt fest, dass die angegebene Funktion
43 bei normalem Programmende aufgerufen wird, also wenn entweder
45 aufgerufen wird oder das Programm aus seiner \fBmain\fP-Funktion zurückkehrt.
46 Funktionen, die so festgelegt sind, werden in umgekehrter Reihenfolge ihrer
47 Registrierung aufgerufen; es werden keine Argumente übergeben.
49 Die Funktion \fBatexit()\fP gibt 0 zurück bei Erfolg; anderenfalls wird
50 der Wert \-1 zurückgegeben und die globale Variable \fIerrno\fP gesetzt,
51 um den Fehler anzuzeigen.
55 Nicht ausreichend Speicher verfügbar, um die Funktion hinzuzufügen.
57 SVID 3, BSD 4.3, ISO 9899