OSDN Git Service

(split) Move Japanese translation histories after original history sections.
[linuxjm/LDP_man-pages.git] / draft / man2 / _exit.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" This manpage is Copyright (C) 1992 Drew Eckhardt;
4 .\"                               1993 Michael Haardt, Ian Jackson.
5 .\"
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.
9 .\"
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.
14 .\"
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
21 .\" professionally.
22 .\"
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
25 .\"
26 .\" Modified Wed Jul 21 23:02:38 1993 by Rik Faith <faith@cs.unc.edu>
27 .\" Modified 2001-11-17, aeb
28 .\"
29 .\" Japanese Version Copyright (c) 1997 KUNIMOTO Yasuhiro, all rights reserved.
30 .\" Translated Jun 27, 1997 by KUNIMOTO Yasuhiro (hiro@kthree.co.jp)
31 .\" Modified  Jun 28, 1997 by Yoshiki Sugiura (yox@in.aix.or.jp)
32 .\" Modified  Jul  6, 1997 by Yoshiki Sugiura (yox@in.aix.or.jp)
33 .\" Updated & Modified Sun Dec  9 20:02:10 JST 2001
34 .\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
35 .\" Updated Sat Sep  3 04:26:00 JST 2005
36 .\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
37 .\"
38 .\"WORD     descriptors ¥Ç¥£¥¹¥¯¥ê¥×¥¿
39 .\"
40 .TH _EXIT 2 2010-09-20 "Linux" "Linux Programmer's Manual"
41 .\"O .SH NAME
42 .SH Ì¾Á°
43 .\"O _exit, _Exit \- terminate the calling process
44 _exit, _Exit \- ¸Æ¤Ó½Ð¤·¸µ¤Î¥×¥í¥»¥¹¤ò½ªÎ»¤µ¤»¤ë
45 .\"O .SH SYNOPSIS
46 .SH ½ñ¼°
47 .B #include <unistd.h>
48 .sp
49 .BI "void _exit(int " status );
50 .sp
51 .B #include <stdlib.h>
52 .sp
53 .BI "void _Exit(int " status );
54 .sp
55 .in -4n
56 .\"O Feature Test Macro Requirements for glibc (see
57 .\"O .BR feature_test_macros (7)):
58 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
59 .RB ( feature_test_macros (7)
60 »²¾È):
61 .in
62 .sp
63 .ad l
64 .BR _Exit ():
65 .RS 4
66 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
67 _POSIX_C_SOURCE\ >=\ 200112L;
68 .br
69 .\"O or
70 ¤Þ¤¿¤Ï
71 .I cc\ -std=c99
72 .ad
73 .\"O .SH DESCRIPTION
74 .SH ÀâÌÀ
75 .\"O The function
76 .\"O .BR _exit ()
77 .\"O terminates the calling process "immediately".
78 .\"O Any open file descriptors
79 .\"O belonging to the process are closed; any children of the process are
80 .\"O inherited by process 1,
81 .\"O .IR init ,
82 .\"O and the process's parent is sent a
83 .\"O .B SIGCHLD
84 .\"O signal.
85 .BR _exit ()
86 ¤Ï¡¢¤½¤ì¤ò¸Æ¤ó¤À¥×¥í¥»¥¹¤ò¡Öľ¤Á¤Ë¡×½ªÎ»¤µ¤»¤ë¡£
87 ¤½¤ÎºÝ¡¢¤³¤Î¥×¥í¥»¥¹¤¬½êÍ­¤·¤Æ¤¤¤ë¥Ç¥£¥¹¥¯¥ê¥×¥¿ (descriptor) ¤Ç¡¢
88 ¥ª¡¼¥×¥ó¤µ¤ì¤Æ¤¤¤ë¤â¤Î¤ÏÁ´¤Æ¥¯¥í¡¼¥º¤µ¤ì¤ë¡£
89 ¤Þ¤¿¡¢¤³¤Î¥×¥í¥»¥¹¤¬½êÍ­¤¹¤ë»Ò¥×¥í¥»¥¹¤ÏÁ´¤Æ¡¢¥×¥í¥»¥¹ÈÖ¹æ 1¡¢
90 ¤Ä¤Þ¤ê
91 .I init
92 ¥×¥í¥»¥¹¤Ë¤è¤Ã¤Æ·Ñ¾µ¤µ¤ì¡¢¤³¤Î¥×¥í¥»¥¹¤Î¿Æ¥×¥í¥»¥¹¤ËÂФ·¤Æ
93 .B SIGCHLD
94 ¥·¥°¥Ê¥ë¤¬Á÷½Ð¤µ¤ì¤ë¡£
95 .LP
96 .\"O The value
97 .\"O .I status
98 .\"O is returned to the parent process as the process's exit status, and
99 .\"O can be collected using one of the
100 .\"O .BR wait 2()
101 .\"O family of calls.
102 .I status
103 ¤ÎÃͤϡ¢¤³¤Î¥×¥í¥»¥¹¤Î½ªÎ»¾õÂ֤Ȥ·¤Æ¤½¤Î¿Æ¥×¥í¥»¥¹¤ËÂФ·¤ÆÊÖ¤µ¤ì¡¢
104 .BR wait (2)
105 ·Ï´Ø¿ô¤òÍøÍѤ¹¤ë¤³¤È¤Ë¤è¤Ã¤Æ¼èÆÀ¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
106 .LP
107 .\"O The function
108 .\"O .BR _Exit ()
109 .\"O is equivalent to
110 .\"O .BR _exit ().
111 ´Ø¿ô
112 .BR _Exit ()
113 ¤Ï
114 .BR _exit ()
115 ¤ÈÅù²Á¤Ç¤¢¤ë¡£
116 .\"O .SH "RETURN VALUE"
117 .SH ÊÖ¤êÃÍ
118 .\"O These functions do not return.
119 ¤³¤ì¤é¤Î´Ø¿ô¤ÏÃͤòÊÖ¤µ¤Ê¤¤¡£
120 .\"O .SH "CONFORMING TO"
121 .SH ½àµò
122 SVr4, POSIX.1-2001, 4.3BSD.
123 .\"O The function
124 .\"O .BR _Exit ()
125 .\"O was introduced by C99.
126 ´Ø¿ô
127 .BR _Exit ()
128 ¤Ï C99 ¤ÇƳÆþ¤µ¤ì¤¿¡£
129 .\"O .SH NOTES
130 .SH Ãí°Õ
131 .\"O For a discussion on the effects of an exit, the transmission of
132 .\"O exit status, zombie processes, signals sent, etc., see
133 .\"O .BR exit (3).
134 exit ¤ÎÌò³ä¡¦½ªÎ»¾õÂ֤μõÅϤ·¡¦
135 ¥¾¥ó¥Ó¥×¥í¥»¥¹¡¦¥·¥°¥Ê¥ëÁ÷½Ð¤Ê¤É¤Ë¤Ä¤¤¤Æ¤ÎµÄÏÀ¤Ï¡¢
136 .BR exit (3)
137 ¤ò»²¾È¤¹¤ë¤³¤È¡£
138 .LP
139 .\"O The function
140 .\"O .BR _exit ()
141 .\"O is like
142 .\"O .BR exit (3),
143 .\"O but does not call any
144 .\"O functions registered with
145 .\"O .BR atexit (3)
146 .\"O or
147 .\"O .BR on_exit (3).
148 .\"O Whether it flushes
149 .\"O standard I/O buffers and removes temporary files created with
150 .\"O .BR tmpfile (3)
151 .\"O is implementation-dependent.
152 ´Ø¿ô
153 .BR _exit ()
154 ¤Ï
155 .BR exit (3)
156 ¤Ë»÷¤Æ¤¤¤ë¤¬¡¢ANSI C ¤Î
157 .BR atexit (3)
158 ¤ä
159 .BR on_exit (3)
160 ¤Ë¤è¤Ã¤ÆÅÐÏ¿¤µ¤ì¤¿¤¤¤«¤Ê¤ë´Ø¿ô¤â¸Æ¤Ó½Ð¤µ¤Ê¤¤¡£
161 ɸ½à I/O ¥Ð¥Ã¥Õ¥¡¤Î¥Õ¥é¥Ã¥·¥å¤ä¡¢
162 .BR tmpfile (3)
163 ¤ÇºîÀ®¤µ¤ì¤¿¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤Îºï½ü¤ò¹Ô¤¦¤«¤É¤¦¤«¤Ï¡¢¼ÂÁõ¤Ë°Í¸¤¹¤ë¡£
164 .\"O On the other hand,
165 .\"O .BR _exit ()
166 .\"O does close open file descriptors, and this may cause an unknown delay,
167 .\"O waiting for pending output to finish.
168 .\"O If the delay is undesired,
169 .\"O it may be useful to call functions like
170 .\"O .BR tcflush (3)
171 .\"O before calling
172 .\"O .BR _exit ().
173 .\"O Whether any pending I/O is canceled, and which pending I/O may be
174 .\"O canceled upon
175 .\"O .BR _exit (),
176 .\"O is implementation-dependent.
177 °ìÊý¤Ç¡¢
178 .BR _exit ()
179 ¤Ï¥ª¡¼¥×¥ó¤µ¤ì¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤ò¥¯¥í¡¼¥º¤·¤Ê¤¤¤¿¤á¡¢
180 ̤·èÄê¤Ë¤Ê¤Ã¤Æ¤¤¤ë½ÐÎϤ¬¥Õ¥é¥Ã¥·¥å¤µ¤ì¤ë¤Î¤òÂԤĤΤËÉÔ³ÎÄê¤ÊÃ٤줬ȯÀ¸¤¹¤ë¡£
181 ¤³¤ÎÃÙ¤ì¤òȯÀ¸¤µ¤»¤¿¤¯¤Ê¤±¤ì¤Ð¡¢
182 .BR _exit ()
183 ¤ÎÁ°¤Ë
184 .BR tcflush (3)
185 ¤Î¤è¤¦¤Ê´Ø¿ô¤ò¸Æ¤Ó½Ð¤»¤Ð¤è¤¤¡£
186 .BR _exit ()
187 ¤¬¸Æ¤Ó½Ð¤µ¤ì¤¿¤È¤­¤Ë¡¢
188 ̤·èÄê¤Ë¤Ê¤Ã¤Æ¤¤¤ëÁ´¤Æ¤Î I/O ¤¬¥­¥ã¥ó¥»¥ë¤µ¤ì¤ë¤Î¤«¡¢
189 ¤Þ¤¿¤É¤Î I/O ¤¬¥­¥ã¥ó¥»¥ë¤µ¤ì¤ë¤Î¤«¤Ï¼ÂÁõ¤Ë°Í¸¤¹¤ë¡£
190
191 .\"O In glibc up to version 2.3, the
192 .\"O .BR _exit ()
193 .\"O wrapper function invoked the kernel system call of the same name.
194 .\"O Since glibc 2.3, the wrapper function invokes
195 .\"O .BR exit_group (2),
196 .\"O in order to terminate all of the threads in a process.
197 ¥Ð¡¼¥¸¥ç¥ó 2.3 ¤è¤êÁ°¤Î glibc ¤Ç¤Ï¡¢
198 .BR _exit ()
199 ¤Î¥é¥Ã¥Ñ¡¼´Ø¿ô¤ÏƱ¤¸Ì¾Á°¤Î¥«¡¼¥Í¥ë¡¦¥·¥¹¥Æ¥à¥³¡¼¥ë¤òµ¯Æ°¤·¤Æ¤¤¤¿¡£
200 glibc 2.3 °Ê¹ß¤Ç¤Ï¡¢¥×¥í¥»¥¹Æâ¤ÎÁ´¤Æ¤Î¥¹¥ì¥Ã¥É¤ò½ªÎ»¤¹¤ë¤¿¤á¤Ë¡¢
201 ¥é¥Ã¥Ñ¡¼´Ø¿ô¤Ï
202 .BR exit_group (2)
203 ¤òµ¯Æ°¤¹¤ë¡£
204 .\"O .SH "SEE ALSO"
205 .SH ´ØÏ¢¹àÌÜ
206 .BR execve (2),
207 .BR exit_group (2),
208 .BR fork (2),
209 .BR kill (2),
210 .BR wait (2),
211 .BR wait4 (2),
212 .BR waitpid (2),
213 .BR atexit (3),
214 .BR exit (3),
215 .BR on_exit (3),
216 .BR termios (3)