source: trunk/minix/man/man3/exit.3@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 909 bytes
Line 
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.
4.\"
5.\" @(#)exit.3 6.2 (Berkeley) 5/12/86
6.\"
7.TH EXIT 3 "May 12, 1986"
8.UC 5
9.SH NAME
10exit, atexit \- terminate a process after flushing any pending output
11.SH SYNOPSIS
12.nf
13.ft B
14#include <stdlib.h>
15
16void exit(int \fIstatus\fP)
17int atexit(void (*\fIfunc\fP)(void))
18.ft R
19.fi
20.SH DESCRIPTION
21.B Exit
22first calls all functions registered by
23.BR atexit ,
24flushes all data buffered by the Standard I/O library, and finally
25terminates the process.
26.B Exit
27never returns.
28.PP
29.B Atexit
30registers the function
31.I func
32into a table of functions to be called on exit.
33.SH "SEE ALSO"
34.BR exit (2).
35.SH DIAGNOSTICS
36.B Atexit
37returns 0 on success, \-1 if
38.B malloc
39cannot allocate more memory for the list of registered functions.
Note: See TracBrowser for help on using the repository browser.