1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" This manpage is Copyright (C) 1992 Drew Eckhardt;
4 .\" 1993 Michael Haardt, Ian Jackson.
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date. The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein. The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
26 .\" Modified Wed Jul 21 23:02:38 1993 by Rik Faith <faith@cs.unc.edu>
27 .\" Modified 2001-11-17, aeb
29 .TH _EXIT 2 2010-09-20 "Linux" "Linux Programmer's Manual"
31 _exit, _Exit \- terminate the calling process
33 .B #include <unistd.h>
35 .BI "void _exit(int " status );
37 .B #include <stdlib.h>
39 .BI "void _Exit(int " status );
42 Feature Test Macro Requirements for glibc (see
43 .BR feature_test_macros (7)):
49 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
50 _POSIX_C_SOURCE\ >=\ 200112L;
59 terminates the calling process "immediately".
60 Any open file descriptors
61 belonging to the process are closed; any children of the process are
62 inherited by process 1,
64 and the process's parent is sent a
70 is returned to the parent process as the process's exit status, and
71 can be collected using one of the
80 These functions do not return.
82 SVr4, POSIX.1-2001, 4.3BSD.
85 was introduced by C99.
87 For a discussion on the effects of an exit, the transmission of
88 exit status, zombie processes, signals sent, etc., see
96 functions registered with
101 standard I/O buffers and removes temporary files created with
103 is implementation-dependent.
106 does close open file descriptors, and this may cause an unknown delay,
107 waiting for pending output to finish.
108 If the delay is undesired,
109 it may be useful to call functions like
113 Whether any pending I/O is canceled, and which pending I/O may be
116 is implementation-dependent.
118 In glibc up to version 2.3, the
120 wrapper function invoked the kernel system call of the same name.
121 Since glibc 2.3, the wrapper function invokes
123 in order to terminate all of the threads in a process.