
EXIT(2)                    UNIX Programmer's Manual                    EXIT(2)

NNAAMMEE
     __eexxiitt - terminate the calling process

SSYYNNOOPPSSIISS
     ##iinncclluuddee <<uunniissttdd..hh>>

     _v_o_i_d _v_o_l_a_t_i_l_e
     __eexxiitt(_i_n_t _s_t_a_t_u_s)

DDEESSCCRRIIPPTTIIOONN
     The __eexxiitt() function terminates a process with the following conse-
     quences:

     oo   All of the descriptors open in the calling process are closed.  This
         may entail delays, for example, waiting for output to drain; a pro-
         cess in this state may not be killed, as it is already dying.

     oo   If the parent process of the calling process has an outstanding wait
         call or is interested in the SIGCHLD signal, it is notified of the
         calling process's termination and the _s_t_a_t_u_s area is set as defined
         by wait(2).

     oo   The parent process-ID of all of the calling process's existing child
         processes are set to 1; the initialization process (see the DEFINI-
         TIONS section of intro(2))  inherits each of these processes.  Any
         stopped children are restarted with a hangup signal (SIGHUP).

     Most C programs call the library routine exit(3),  which flushes buffers,
     closes streams, unlinks temporary files, etc., before calling __eexxiitt().

RREETTUURRNN VVAALLUUEE
     __eexxiitt() can never return.

SSEEEE AALLSSOO
     fork(2),  sigvec(2),  wait(2),  exit(3)

HHIISSTTOORRYY
     An eexxiitt function call appeared in Version 6 AT&T UNIX.

4th Berkeley Distribution        July 25, 1991                               1























