Apple Developer Connection
Advanced Search
Member Login Log In | Not a Member? Contact ADC
ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

This manual page is associated with the Mac OS X developer tools. The software or headers described may not be present on your Mac OS X installation until you install the developer tools package. This package is available on your Mac OS X installation DVD, and the latest versions can be downloaded from developer.apple.com.

For more information about the manual page format, see the manual page for manpages(5).



EXIT(2)                     BSD System Calls Manual                    EXIT(2)

NAME
     _exit -- terminate the calling process

SYNOPSIS
     #include <unistd.h>

     void
     _exit(int status);

DESCRIPTION
     The _exit() function terminates a process, with the following consequences:

     oo   All of the descriptors that were 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.

     oo   If the parent process of the calling process has an outstanding wait call or catches the SIGCHLD
         signal, it is notified of the calling process's termination; the status is set as defined by
         wait(2).

     oo   The parent process-ID of all of the calling process's existing child processes are set to 1; the
         initialization process (see the DEFINITIONS section of intro(2)) inherits each of these processes.

     oo   If the termination of the process causes any process group to become orphaned (usually because the
         parents of all members of the group have now exited; see ``orphaned process group'' in intro(2)),
         and if any member of the orphaned group is stopped, the SIGHUP signal and the SIGCONT signal are
         sent to all members of the newly-orphaned process group.

     oo   If the process is a controlling process (see intro(2)), the SIGHUP signal is sent to the foreground
         process group of the controlling terminal.  All current access to the controlling terminal is
         revoked.

     Most C programs call the library routine exit(3), which flushes buffers, closes streams, unlinks tempo-rary temporary
     rary files, etc., before calling _exit().

RETURN VALUE
     _exit() can never return.

SEE ALSO
     fork(2), sigaction(2), wait(2), exit(3)

STANDARDS
     The _exit function is defined by IEEE Std 1003.1-1988 (``POSIX.1'').

4th Berkeley Distribution        June 4, 1993        4th Berkeley Distribution



Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.