1 .\" Copyright (c) 1983 Regents of the University of California.
2 .\" All rights reserved. The Berkeley software License Agreement
3 .\" specifies the terms and conditions for redistribution.
5 .\" @(#)exit.3 6.2 (Berkeley) 5/12/86
7 .TH EXIT 3 "May 12, 1986"
10 exit, atexit \- terminate a process after flushing any pending output
16 void exit(int \fIstatus\fP)
17 int atexit(void (*\fIfunc\fP)(void))
22 first calls all functions registered by
24 flushes all data buffered by the Standard I/O library, and finally
25 terminates the process.
30 registers the function
32 into a table of functions to be called on exit.
37 returns 0 on success, \-1 if
39 cannot allocate more memory for the list of registered functions.