HP 3000 Manuals

_exit [ MPE/iX Developer's Kit Reference Manual Volume I ] MPE/iX 5.0 Documentation


MPE/iX Developer's Kit Reference Manual Volume I

_exit 

Terminates a process.

Syntax 

     #include <unistd.h>
     void _exit (int status);

Parameters 

status     A status code to be made available to the parent process of
           the calling process through the wait() or waitpid() functions.

Return Values 

None.  This function does not return to the calling process.

Description 

The _exit() function terminates the calling process.  The following
actions are performed:

   *   The calling process is terminated.

   *   All open files and directory streams in the calling process are
       closed.

   *   The low-order 8 bits of the status parameter are saved and made
       available to the parent process through the wait() or waitpid()
       functions.

   *   All child processes of the calling process are terminated.

   *   A SIGCHLD signal is sent to the parent process to notify it of the
       calling process's termination.

Implementation Considerations 

All child processes of the calling process are terminated.  They are not
adopted by a system process.

The CI session variable CJCW is set to status.

Time accounting information of the calling process is not made available
to the parent process through the wait() or waitpid() functions.  A zero
is always returned.

No user process can be a controlling process.  Only system processes (CI
processes) are allowed to be controlling processes.

The controlling terminal is not disassociated from the session of the
calling process.

Errors 

None.

See Also 

close(), sigaction(), wait(), waitpid(), POSIX.1 (Section 3.2.2)



MPE/iX 5.0 Documentation