OSDN Git Service

(split) LDP v3.24 -> v3.29 の定型的な変更内容を反映。
[linuxjm/LDP_man-pages.git] / release / man3 / exit.3
1 .\" Copyright (C) 2001 Andries Brouwer <aeb@cwi.nl>.
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" Japanese Version Copyright (c) 1997 HORIMOTO Masafumi
24 .\"         all rights reserved.
25 .\" Translated 1997-09-10, HORIMOTO Masafumi
26 .\" Updated & Modified 2001-10-27, Yuichi SATO <ysato@h4.dion.ne.jp>
27 .\" Updated & Modified 2001-12-09, Yuichi SATO
28 .\" Updated & Modified 2005-09-06, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
29 .\" Updated 2007-06-18, Akihiro MOTOKI, LDP v2.57
30 .\"
31 .TH EXIT 3  2009-09-20 "Linux" "Linux Programmer's Manual"
32 .SH Ì¾Á°
33 exit \- ¥×¥í¥»¥¹¤ÎÀµ¾ï½ªÎ»
34 .SH ½ñ¼°
35 .nf
36 .B #include <stdlib.h>
37 .sp
38 .BI "void exit(int " status );
39 .fi
40 .SH ÀâÌÀ
41 .BR exit ()
42 ´Ø¿ô¤Ï¡¢¥×¥í¥»¥¹¤òÀµ¾ï¤Ë½ªÎ»¤µ¤»¡¢
43 \fIstatus & 0377\fP ¤È¤¤¤¦Ãͤò¿Æ¥×¥í¥»¥¹¤ØÊÖ¤¹
44 .RB ( wait (2)
45 ¤ò»²¾È)¡£
46 .LP
47 .BR atexit (3)
48 ¤ä
49 .BR on_exit (3)
50 ¤Ë¤è¤Ã¤Æ
51 ÅÐÏ¿¤µ¤ì¤¿Á´¤Æ¤Î´Ø¿ô¤Ï¡¢¤½¤ì¤é¤¬ÅÐÏ¿¤µ¤ì¤¿½çÈ֤ȵսç¤Ë¥³¡¼¥ë¤µ¤ì¤ë¡£
52 (ÅÐÏ¿¤µ¤ì¤¿´Ø¿ô¤ÎÃæ¤Ç
53 .BR atexit (3)
54 or
55 .BR on_exit (3)
56 ¤ò»È¤Ã¤Æ
57 exit ½èÍýÃæ¤Ë¼Â¹Ô¤µ¤ì¤ëÄɲäδؿô¤òÅÐÏ¿¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë;
58 ¿·µ¬¤ËÅÐÏ¿¤µ¤ì¤¿´Ø¿ô¤Ï¡¢¤³¤Î¸å¤Ç¼Â¹Ô¤µ¤ì¤ë´Ø¿ô¥ê¥¹¥È¤ÎÀèƬ¤Ë
59 Äɲ䵤ì¤ë¡£)
60 ¤³¤ì¤é¤Î´Ø¿ô¤Î°ì¤Ä¤¬ÊÖ¤é¤Ê¤«¤Ã¤¿¾ì¹ç
61 (Î㤨¤Ð¡¢¤½¤Î´Ø¿ô¤¬
62 .BR _exit (2)
63 ¤ò¸Æ¤Ó½Ð¤·¤¿¤ê¡¢¥·¥°¥Ê¥ë¤Ç¼«Ê¬¼«¿È¤ò kill ¤·¤¿¾ì¹ç)¡¢
64 »Ä¤ê¤Î´Ø¿ô¤Ï¤É¤ì¤â¸Æ¤Ó½Ð¤µ¤ì¤º¡¢¤½¤ì°Ê¹ß¤Î exit ½èÍý
65 (ÆäË
66 .BR stdio (3)
67 ¥¹¥È¥ê¡¼¥à¤Î¥Õ¥é¥Ã¥·¥å¤Ê¤É) ¤ÏÃæ»ß¤µ¤ì¤ë¡£
68 ¤¢¤ë´Ø¿ô¤¬
69 .BR atexit (3)
70 ¤ä
71 .BR on_exit (3)
72 ¤ò»È¤Ã¤ÆÊ£¿ô²óÅÐÏ¿¤µ¤ì¤Æ¤¤¤¿¾ì¹ç¡¢
73 ¤½¤Î´Ø¿ô¤ÏÅÐÏ¿¤µ¤ì¤¿¤Î¤ÈƱ¤¸²ó¿ô¤À¤±¸Æ¤Ó½Ð¤µ¤ì¤ë¡£
74 .LP
75 ¥ª¡¼¥×¥óÃæ¤Î
76 .BR stdio (3)
77 ¥¹¥È¥ê¡¼¥à¤ÏÁ´¤Æ¥Õ¥é¥Ã¥·¥å¤µ¤ì¤Æ¡¢¥¯¥í¡¼¥º¤µ¤ì¤ë¡£
78 .BR tmpfile (3)
79 ¤Ë¤è¤Ã¤ÆºîÀ®¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤Ïºï½ü¤µ¤ì¤ë¡£
80 .LP
81 C É¸½à¤Ç¤Ï
82 .B EXIT_SUCCESS
83 ¤È
84 .B EXIT_FAILURE
85 ¤È¤¤¤¦ 2¤Ä¤ÎÄê¿ô¤¬
86 ÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£¤½¤ì¤¾¤ìÀµ¾ï½ªÎ»¤È°Û¾ï½ªÎ»¤ò¼¨¤¹¤â¤Î¤Ç¡¢
87 .BR exit ()
88 ¤È¤·¤ÆÅϤ¹¤³¤È¤¬¤Ç¤­¤ë¡£
89 .SH ÊÖ¤êÃÍ
90 .BR exit ()
91 ´Ø¿ô¤ÏÊÖ¤é¤Ê¤¤¡£
92 .SH ½àµò
93 SVr4, 4.3BSD, POSIX.1-2001, C89, C99.
94 .SH Ãí°Õ
95 .LP
96 .BR atexit (3)
97 ¤ä
98 .BR on_exit (3)
99 ¤ò»È¤Ã¤ÆÅÐÏ¿¤µ¤ì¤¿´Ø¿ô¤ÎÃæ¤Ç
100 .BR exit ()
101 ¤«
102 .BR longjmp (3)
103 ¤¬¸Æ¤Ó½Ð¤µ¤ì¤¿¾ì¹ç¡¢
104 ²¿¤¬µ¯¤³¤ë¤«¤Ï̤ÄêµÁ¤Ç¤¢¤ë¡£
105 .LP
106 .B EXIT_SUCCESS
107 ¤È
108 .B EXIT_FAILURE
109 ¤ò»È¤¦¤È¡¢0 ¤ä (1 ¤ä \-1 ¤È¤¤¤Ã¤¿) 0 °Ê³°¤ÎÃͤò»È¤¦¤Î¤ËÈæ¤Ù¤Æ
110 (UNIX °Ê³°¤Î´Ä¶­¤Ë) °Ü¿¢¤¹¤ë¤Î¤¬¤¤¤¯¤é¤«´Êñ¤Ë¤Ê¤ë¡£
111 ÆäˠVMS ¤ÏÊ̤ÎÊý¼°¤òÍѤ¤¤Æ¤¤¤ë¡£
112 .LP
113 BSD ¤Ï½ªÎ»¥³¡¼¥É¤òɸ½à²½¤·¤è¤¦¤È¤·¤Æ¤¤¤ë;
114 .I <sysexits.h>
115 ¤ò»²¾È¤¹¤ë¤³¤È¡£
116 .LP
117 .BR exit ()
118 ¤Î¸å¡¢¿Æ¥×¥í¥»¥¹¤Ë½ªÎ»¥¹¥Æ¡¼¥¿¥¹¤¬ÅϤµ¤ì¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
119 ½ªÎ»¥¹¥Æ¡¼¥¿¥¹¤ÎÅϤ·Êý¤Ë¤Ï 3 ¤Ä¤Î¾ì¹ç¤¬¤¢¤ë¡£
120 ¿Æ¥×¥í¥»¥¹¤¬
121 .B SA_NOCLDWAIT
122 ¤òÀßÄꤷ¤¿¾ì¹ç¡¢
123 ¤Þ¤¿¤Ï
124 .B SIGCHLD
125 ¥Ï¥ó¥É¥é¤ò
126 .B SIG_IGN
127 ¤ËÀßÄꤷ¤¿¾ì¹ç¡¢
128 ¥¹¥Æ¡¼¥¿¥¹¤ÏÇË´þ¤µ¤ì¤ë¡£
129 ¿Æ¥×¥í¥»¥¹¤¬»Ò¥×¥í¥»¥¹¤Î½ªÎ»¤òÂԤäƤ¤¤ë¾ì¹ç¡¢
130 ¿Æ¥×¥í¥»¥¹¤Ë½ªÎ»¥¹¥Æ¡¼¥¿¥¹¤¬ÅÁ¤¨¤é¤ì¤ë¡£
131 ¤É¤Á¤é¤Î¾ì¹ç¤Ç¤â exit ¤Î¥×¥í¥»¥¹¤Ïľ¤Á¤Ë½ªÎ»¤¹¤ë¡£
132 ¡Ö½ªÎ»¥¹¥Æ¡¼¥¿¥¹¤ò´ØÃΤ»¤º½ªÎ»¤âÂÔ¤¿¤Ê¤¤¡×
133 ¤È¤¤¤¦¤³¤È¤ò¿Æ¥×¥í¥»¥¹¤¬»Ø¼¨¤·¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢
134 exit ¥×¥í¥»¥¹¤Ï (½ªÎ»¥¹¥Æ¡¼¥¿¥¹¤òɽ¤¹ 1 ¥Ð¥¤¥È¤Î¤ß¤òÊÝ»ý¤¹¤ë)
135 ¡Ö¥¾¥ó¥Ó¡×¥×¥í¥»¥¹¤Ë¤Ê¤ë¡£
136 ¤³¤ì¤Ë¤è¤ê¡¢¸å¤«¤é
137 .BR wait (2)
138 ´Ø¿ô¤ò¸Æ¤Ó½Ð¤¹¤³¤È¤Ç¡¢
139 ¿Æ¥×¥í¥»¥¹¤Ï½ªÎ»¥¹¥Æ¡¼¥¿¥¹¤òÃΤ뤳¤È¤¬¤Ç¤­¤ë¡£
140 .LP
141 .B SIGCHLD
142 ¥·¥°¥Ê¥ë¤Î¥µ¥Ý¡¼¥È¤¬¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢
143 ¤³¤Î¥·¥°¥Ê¥ë¤Ï¿Æ¥×¥í¥»¥¹¤ËÁ÷¤é¤ì¤ë¡£
144 ¿Æ¥×¥í¥»¥¹¤¬
145 .B SA_NOCLDWAIT
146 ¤òÀßÄꤷ¤¿¾ì¹ç¡¢
147 .B SIGCHLD
148 ¥·¥°¥Ê¥ë¤¬Á÷¤é¤ì¤ë¤«¤É¤¦¤«¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
149 .LP
150 ¤½¤Î¥×¥í¥»¥¹¤¬¥»¥Ã¥·¥ç¥ó¤Î¥ê¡¼¥À¡¼¤Ç¡¢
151 ¤½¤Î¥×¥í¥»¥¹¤ÎÀ©¸æüËö¤¬¤½¤Î¥»¥Ã¥·¥ç¥ó¤ÎÀ©¸æüËö¤Ç¤¢¤ë¾ì¹ç¡¢
152 ¤³¤ÎÀ©¸æüËö¤Î¥Õ¥©¥¢¥°¥é¥¦¥ó¥É¥×¥í¥»¥¹¥°¥ë¡¼¥×¤Ë¤¢¤ë
153 ³Æ¥×¥í¥»¥¹¤Ë
154 .B SIGHUP
155 ¥·¥°¥Ê¥ë¤¬Á÷¤é¤ì¡¢Ã¼Ëö¤¬¥»¥Ã¥·¥ç¥ó¤«¤éÀÚ¤êÎ¥¤µ¤ì¤ë¡£
156 ¤³¤ì¤Ë¤è¤ê¿·¤·¤¤À©¸æ¥×¥í¥»¥¹¤ò¼èÆÀ¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
157 .LP
158 ¥×¥í¥»¥¹¤¬½ªÎ»¤¹¤ë¤³¤È¤Ë¤è¤ê¡¢¥×¥í¥»¥¹¥°¥ë¡¼¥×¤¬¸ÉΩ¤·¤Æ¡¢
159 ¤½¤Î¥°¥ë¡¼¥×¤Î¥á¥ó¥Ð¡¼¤Î¤¦¤Á¤Î¤É¤ì¤«¤¬Ää»ß¤·¤¿¾ì¹ç¡¢
160 ¥×¥í¥»¥¹¥°¥ë¡¼¥×¤Î³Æ¥×¥í¥»¥¹¤ËÂФ·¤Æ
161 .B SIGHUP
162 ¥·¥°¥Ê¥ë¤¬Á÷¤é¤ì¡¢Â³¤¤¤Æ
163 .B SIGCONT
164 ¥·¥°¥Ê¥ë¤¬Á÷¤é¤ì¤ë¡£
165 ¸ÉΩ¤·¤¿ (orphaned) ¥×¥í¥»¥¹¥°¥ë¡¼¥×¤ÎÀâÌÀ¤Ï
166 .BR setpgid (2)
167 ¤ò»²¾È¡£
168 .SH ´ØÏ¢¹àÌÜ
169 .BR _exit (2),
170 .BR setpgid (2),
171 .BR wait (2),
172 .BR atexit (3),
173 .BR on_exit (3),
174 .BR tmpfile (3)