source: trunk/minix/man/man2/exit.2@ 11

Last change on this file since 11 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 1.5 KB
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
10exit, _exit \- terminate a process
11.SH SYNOPSIS
12.nf
13.ft B
14void _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
22terminates a process with the following consequences:
23.RS
24.SP
25All of the descriptors open in the calling process are closed.
26This may entail delays, for example, waiting for output to drain;
27a process in this state may not be killed, as it is already dying.
28.SP
29If the parent process of the calling process is executing a
30.B wait
31or is interested in the SIGCHLD signal (Minix-vmd),
32then it is notified of the calling process's termination and
33the low-order eight bits of \fIstatus\fP are made available to it;
34see
35.BR wait (2).
36.SP
37The parent process ID of all of the calling process's existing child
38processes are also set to 1. This means that the initialization process
39(see
40.BR intro (2))
41inherits each of these processes as well.
42.ig
43Any stopped children are restarted with a hangup signal (SIGHUP).
44..
45.RE
46.PP
47Most C programs call the library routine
48.BR exit (3),
49which performs cleanup actions in the standard I/O library before
50calling \fI_exit\fP\|.
51.SH "RETURN VALUE"
52This 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.