OSDN Git Service

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