EXIT(2) UNIX Programmer's Manual EXIT(2)
_exit - terminate a process
S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
_
\b_e
\bex
\bxi
\bit
\bt(
\b(s
\bst
\bta
\bat
\btu
\bus
\bs)
\b)
i
\bin
\bnt
\bt s
\bst
\bta
\bat
\btu
\bus
\bs;
\b;
D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
__
\be_
\bx_
\bi_
\bt terminates a process with the following consequences:
All of the descriptors 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,
If the parent process of the calling process is executing a
_
\bw_
\ba_
\bi_
\bt or is interested in the SIGCHLD signal, then it is
notified of the calling process's termination and the low-
order eight bits of _
\bs_
\bt_
\ba_
\bt_
\bu_
\bs are made available to it; see
The parent process ID of all of the calling process's exist-
ing child processes are also set to 1. This means that the
initialization process (see _
\bi_
\bn_
\bt_
\br_
\bo(2)) inherits each of these
processes as well. Any stopped children are restarted with
a hangup signal (SIGHUP).
Most C programs call the library routine _
\be_
\bx_
\bi_
\bt(3), which per-
forms cleanup actions in the standard I/O library before
calling __
\be_
\bx_
\bi_
\bt.
R
\bRE
\bET
\bTU
\bUR
\bRN
\bN V
\bVA
\bAL
\bLU
\bUE
\bE
S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
fork(2), sigvec(2), wait(2), exit(3)
Printed 7/9/88 May 22, 1986 1