Line | |
---|
1 | .\" Copyright (c) 1980 Regents of the University of California.
|
---|
2 | .\" All rights reserved. The Berkeley software License Agreement
|
---|
3 | .\" specifies the terms and conditions for redistribution.
|
---|
4 | .\"
|
---|
5 | .\" @(#)exit.2 6.4 (Berkeley) 5/22/86
|
---|
6 | .\"
|
---|
7 | .TH EXIT 2 "May 22, 1986"
|
---|
8 | .UC 4
|
---|
9 | .SH NAME
|
---|
10 | exit, _exit \- terminate a process
|
---|
11 | .SH SYNOPSIS
|
---|
12 | .nf
|
---|
13 | .ft B
|
---|
14 | void _exit(int \fIstatus\fP)
|
---|
15 | .fi
|
---|
16 | .SH DESCRIPTION
|
---|
17 | .de SP
|
---|
18 | .if t .sp 0.4
|
---|
19 | .if n .sp
|
---|
20 | ..
|
---|
21 | .B _exit
|
---|
22 | terminates a process with the following consequences:
|
---|
23 | .RS
|
---|
24 | .SP
|
---|
25 | All of the descriptors open in the calling process are closed.
|
---|
26 | This may entail delays, for example, waiting for output to drain;
|
---|
27 | a process in this state may not be killed, as it is already dying.
|
---|
28 | .SP
|
---|
29 | If the parent process of the calling process is executing a
|
---|
30 | .B wait
|
---|
31 | or is interested in the SIGCHLD signal (Minix-vmd),
|
---|
32 | then it is notified of the calling process's termination and
|
---|
33 | the low-order eight bits of \fIstatus\fP are made available to it;
|
---|
34 | see
|
---|
35 | .BR wait (2).
|
---|
36 | .SP
|
---|
37 | The parent process ID of all of the calling process's existing child
|
---|
38 | processes are also set to 1. This means that the initialization process
|
---|
39 | (see
|
---|
40 | .BR intro (2))
|
---|
41 | inherits each of these processes as well.
|
---|
42 | .ig
|
---|
43 | Any stopped children are restarted with a hangup signal (SIGHUP).
|
---|
44 | ..
|
---|
45 | .RE
|
---|
46 | .PP
|
---|
47 | Most C programs call the library routine
|
---|
48 | .BR exit (3),
|
---|
49 | which performs cleanup actions in the standard I/O library before
|
---|
50 | calling \fI_exit\fP\|.
|
---|
51 | .SH "RETURN VALUE"
|
---|
52 | This call never returns.
|
---|
53 | .SH "SEE ALSO"
|
---|
54 | .BR fork (2),
|
---|
55 | .BR sigaction (2),
|
---|
56 | .BR wait (2),
|
---|
57 | .BR exit (3).
|
---|
Note:
See
TracBrowser
for help on using the repository browser.