]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man2/_exit.2
proc.5: tfix
[thirdparty/man-pages.git] / man2 / _exit.2
index 207e2c034015946ca2f845172a2c5ac257d0859a..c55d2a612c1ec73f498eefb4236d4f6f83df5b54 100644 (file)
 .\" Modified Wed Jul 21 23:02:38 1993 by Rik Faith <faith@cs.unc.edu>
 .\" Modified 2001-11-17, aeb
 .\"
-.TH _EXIT 2 2015-07-23 "Linux" "Linux Programmer's Manual"
+.TH _EXIT 2 2017-05-03 "Linux" "Linux Programmer's Manual"
 .SH NAME
 _exit, _Exit \- terminate the calling process
 .SH SYNOPSIS
 .B #include <unistd.h>
-.sp
+.PP
 .BI "void _exit(int " status );
-.sp
+
 .B #include <stdlib.h>
-.sp
+.PP
 .BI "void _Exit(int " status );
-.sp
+.PP
 .in -4n
 Feature Test Macro Requirements for glibc (see
 .BR feature_test_macros (7)):
 .in
-.sp
+.PP
 .ad l
 .BR _Exit ():
 .RS 4
@@ -53,21 +53,24 @@ _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
 The function
 .BR _exit ()
 terminates the calling process "immediately".
-Any open file descriptors
-belonging to the process are closed; any children of the process are
-inherited by process 1,
-.IR init ,
-and the process's parent is sent a
+Any open file descriptors belonging to the process are closed.
+Any children of the process are inherited by
+.BR init (1)
+(or by the nearest "subreaper" process as defined through the use of the
+.BR prctl (2)
+.B PR_SET_CHILD_SUBREAPER
+operation).
+The process's parent is sent a
 .B SIGCHLD
 signal.
-.LP
+.PP
 The value
-.I status
+.I "status & 0377"
 is returned to the parent process as the process's exit status, and
 can be collected using one of the
 .BR wait (2)
 family of calls.
-.LP
+.PP
 The function
 .BR _Exit ()
 is equivalent to
@@ -83,7 +86,7 @@ was introduced by C99.
 For a discussion on the effects of an exit, the transmission of
 exit status, zombie processes, signals sent, and so on, see
 .BR exit (3).
-.LP
+.PP
 The function
 .BR _exit ()
 is like