Files
oldlinux-files/Minix/2.0.0/wwwman/man2/_exit.2.html
2024-02-19 00:21:39 -05:00

72 lines
1.8 KiB
HTML

<HTML>
<HEAD>
<TITLE>exit(2)</TITLE>
</HEAD>
<BODY>
<H1>exit(2)</H1>
<HR>
<PRE>
</PRE>
<H2>NAME</H2><PRE>
exit, _exit - terminate a process
</PRE>
<H2>SYNOPSIS</H2><PRE>
<STRONG>void</STRONG> <STRONG>_exit(int</STRONG> <EM>status</EM><STRONG>)</STRONG>
</PRE>
<H2>DESCRIPTION</H2><PRE>
<STRONG>_exit</STRONG> terminates a process with the following consequences:
All of the descriptors open in the calling process are closed. This
may entail delays, for example, waiting for output to drain; a
process in this state may not be killed, as it is already dying.
If the parent process of the calling process is executing a <STRONG>wait</STRONG> or
is interested in the SIGCHLD signal (Minix-vmd), then it is notified
of the calling process's termination and the low-order eight bits of
<EM>status</EM> are made available to it; see <STRONG><A HREF="../man2/wait.2.html">wait(2)</A></STRONG>.
The parent process ID of all of the calling process's existing child
processes are also set to 1. This means that the initialization
process (see <STRONG><A HREF="../man2/intro.2.html">intro(2)</A></STRONG>) inherits each of these processes as well.
Most C programs call the library routine <STRONG><A HREF="../man3/exit.3.html">exit(3)</A></STRONG>, which performs cleanup
actions in the standard I/O library before calling _<EM>exit</EM>.
</PRE>
<H2>RETURN VALUE</H2><PRE>
This call never returns.
</PRE>
<H2>SEE ALSO</H2><PRE>
<STRONG><A HREF="../man2/fork.2.html">fork(2)</A></STRONG>, <STRONG><A HREF="../man2/sigaction.2.html">sigaction(2)</A></STRONG>, <STRONG><A HREF="../man2/wait.2.html">wait(2)</A></STRONG>, <STRONG><A HREF="../man3/exit.3.html">exit(3)</A></STRONG>.
</PRE>
</BODY>
</HTML>