|
|
1.1 root 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 \- terminate a process
11: .SH SYNOPSIS
12: .nf
13: .ft B
14: _exit(status)
15: int status;
16: .fi
17: .SH DESCRIPTION
18: .I _exit
19: terminates a process with the following consequences:
20: .in +5n
21: .PP
22: All of the descriptors open in the calling process are closed.
23: This may entail delays, for example, waiting for output to drain;
24: a process in this state may not be killed, as it is already dying.
25: .PP
26: If the parent process of the calling process is executing a
27: .I wait
28: or is interested in the SIGCHLD signal,
29: then it is notified of the calling process's termination and
30: the low-order eight bits of \fIstatus\fP are made available to it;
31: see
32: .IR wait (2).
33: .PP
34: The parent process ID of all of the calling process's existing child
35: processes are also set to 1. This means that the initialization process
36: (see
37: .IR intro (2))
38: inherits each of these processes as well.
39: Any stopped children are restarted with a hangup signal (SIGHUP).
40: .in -5n
41: .PP
42: Most C programs call the library routine
43: .IR exit (3),
44: which performs cleanup actions in the standard I/O library before
45: calling \fI_exit\fP\|.
46: .SH "RETURN VALUE"
47: This call never returns.
48: .SH "SEE ALSO"
49: fork(2), sigvec(2), wait(2), exit(3)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.