Repository navigation
Expand file tree
/
Copy pathexit.2
More file actions
57 lines (57 loc) · 1.47 KB
/
Copy pathexit.2
File metadata and controls
57 lines (57 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
<
787F
div data-line-number="10" class="react-line-number react-code-text" style="padding-right:16px">1011
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)exit.2 6.4 (Berkeley) 5/22/86
.\"
.TH EXIT 2 "May 22, 1986"
.UC 4
.SH NAME
exit, _exit \- terminate a process
.SH SYNOPSIS
.nf
.ft B
void _exit(int \fIstatus\fP)
.fi
.SH DESCRIPTION
.de SP
.if t .sp 0.4
.if n .sp
..
.B _exit
terminates a process with the following consequences:
.RS
.SP
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, as it is already dying.
.SP
If the parent process of the calling process is executing a
.B wait
or is interested in the SIGCHLD signal (Minix-vmd),
then it is notified of the calling process's termination and
the low-order eight bits of \fIstatus\fP are made available to it;
see
.BR wait (2).
.SP
The parent process ID of all of the calling process's existing child
processes are also set to 1. This means that the initialization process
(see
.BR intro (2))
inherits each of these processes as well.
.ig
Any stopped children are restarted with a hangup signal (SIGHUP).
..
.RE
.PP
Most C programs call the library routine
.BR exit (3),
which performs cleanup actions in the standard I/O library before
calling \fI_exit\fP\|.
.SH "RETURN VALUE"
This call never returns.
.SH "SEE ALSO"
.BR fork (2),
.BR sigaction (2),
.BR wait (2),
.BR exit (3).