Files
oldlinux-files/Minix/2.0.0/wwwman/man3/exit.3.html
2024-02-19 00:21:39 -05:00

72 lines
1.2 KiB
HTML

<HTML>
<HEAD>
<TITLE>exit(3)</TITLE>
</HEAD>
<BODY>
<H1>exit(3)</H1>
<HR>
<PRE>
</PRE>
<H2>NAME</H2><PRE>
exit, atexit - terminate a process after flushing any pending output
</PRE>
<H2>SYNOPSIS</H2><PRE>
<STRONG>#include</STRONG> <STRONG>&lt;stdlib.h&gt;</STRONG>
<STRONG>void</STRONG> <STRONG>exit(int</STRONG> <EM>status</EM><STRONG>)</STRONG>
<STRONG>int</STRONG> <STRONG>atexit(void</STRONG> <STRONG>(*</STRONG><EM>func</EM><STRONG>)(void))</STRONG>
</PRE>
<H2>DESCRIPTION</H2><PRE>
<STRONG>Exit</STRONG> first calls all functions registered by <STRONG>atexit</STRONG>, flushes all data
buffered by the Standard I/O library, and finally terminates the process.
<STRONG>Exit</STRONG> never returns.
<STRONG>Atexit</STRONG> registers the function <EM>func</EM> into a table of functions to be called
on exit.
</PRE>
<H2>SEE ALSO</H2><PRE>
<STRONG><A HREF="../man2/exit.2.html">exit(2)</A></STRONG>.
</PRE>
<H2>DIAGNOSTICS</H2><PRE>
<STRONG>Atexit</STRONG> returns 0 on success, -1 if <STRONG>malloc</STRONG> cannot allocate more memory for
the list of registered functions.
</PRE>
</BODY>
</HTML>