ultrix man page for exit

Query: exit

OS: ultrix

Section: 2

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

exit(2) 							System Calls Manual							   exit(2)

Name
       _exit - terminate a process

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

Description
       The function, terminates a calling process with the following consequences:

       o    All of the file descriptors open in the calling process are closed.

       o    If	the  parent  process  of  the calling process is executing a it is notified of the calling process's termination and the low-order
	    eight bits of status are made available to it.  For further information, see

       o    The parent process ID of all of the calling process's existing child processes and zombie processes are also set  to  1.   This  means
	    that the initialization process inherits each of these processes as well.  For further information, see

       o    Each  attached  shared memory segment is detached and the value of shm_nattach in the data structure associated with its shared memory
	    identifier is decremented by 1.

       o    For each semaphore for which the calling process has set a semadj value, (see ) that semadj value is added to the semval of the speci-
	    fied semaphore.

       o    If the process has a process, text, or data lock, an unlock is performed.

       o    An accounting record is written on the accounting file if the system's accounting routine is enabled. For more information, see

       Calling	directly  circumvents  all  cleanup.   Most C programs call the library routine which performs cleanup actions in the standard I/O
       library before calling

Environment
   POSIX, System V
       The function differs from the System V as well as POSIX definition in that even if the calling process  is  a  process  group  leader,  the
       SIGHUP signal is not sent to each process that has a process group ID equal to that of the calling process.

       The function also differs in that the routine is declared as type int instead of type void.

See Also
       fork(2), wait(2), exit(3), signal(3).

																	   exit(2)
Related Man Pages
exit(2) - bsd
exit(2) - minix
exit(2) - ultrix
_exit(2) - hpux
atexit(2) - osf1
Similar Topics in the Unix Linux Community
Zombie process