EXIT(2) DOMAIN/IX Reference Manual (SYS5) EXIT(2)
NAME
exit, _exit - terminate process
USAGE
void exit (status)
int status;
void _exit (status)
int status;
DESCRIPTION
Exit terminates the process that called it, with the follow-
ing consequences:
All of the file descriptors open in the calling process
are closed.
If the parent process of the calling process is execut-
ing a wait, it is notified of the calling process' ter-
mination and the low order eight bits (i.e., bits 0377)
of status are made available to it; see wait(2).
If the parent process of the calling process is not
executing a wait, the calling process is transformed
into a ``pseudo-process" that only occupies a slot in
the process table. The process has no other space
allocated either in user or kernel space.
The parent process ID of all of the calling process'
existing child processes and pseudo-processes is set to
1. This means that the initialization process inherits
each of these processes.
Each attached shared memory segment is detached and the
value of shm_nattach in the data structure associated
with its shared memory identifier is decreased by 1.
For each semaphore for which the calling process has
set a semadj value (see semop(2)), that semadj value is
added to the semval of the specified semaphore.
If the process has a process, text, or data lock, an
unlock is performed (see plock(2)).
If the process IDs, tty group IDs, and process group ID
of the calling process are equal, the SIGHUP signal is
sent to each process that has a process group ID equal
to that of the calling process.
The C function exit may cause cleanup actions before the
process exits. The function _exit circumvents all cleanup.
Printed 5/10/85 EXIT-1
EXIT(2) DOMAIN/IX Reference Manual (SYS5) EXIT(2)
NOTES
See WARNING in signal(2).
RELATED INFORMATION
plock(2), semop(2), signal(2), wait(2)
EXIT-2 Printed 5/10/85