OSDN Git Service

(split) Apply minor changes from v3.32 to v3.35 in the upstream.
[linuxjm/LDP_man-pages.git] / release / man3 / perror.3
1 .\" Copyright (c) 1994 Michael Haardt (michael@moria.de), 1994-06-04
2 .\" Copyright (c) 1995 Michael Haardt
3 .\"      (michael@cantor.informatik.rwth-aachen.de), 1995-03-16
4 .\" Copyright (c) 1996 Andries Brouwer (aeb@cwi.nl), 1996-01-13
5 .\"
6 .\" This is free documentation; you can redistribute it and/or
7 .\" modify it under the terms of the GNU General Public License as
8 .\" published by the Free Software Foundation; either version 2 of
9 .\" the License, or (at your option) any later version.
10 .\"
11 .\" The GNU General Public License's references to "object code"
12 .\" and "executables" are to be interpreted as the output of any
13 .\" document formatting or typesetting system, including
14 .\" intermediate and printed output.
15 .\"
16 .\" This manual is distributed in the hope that it will be useful,
17 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
18 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 .\" GNU General Public License for more details.
20 .\"
21 .\" You should have received a copy of the GNU General Public
22 .\" License along with this manual; if not, write to the Free
23 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
24 .\" USA.
25 .\"
26 .\" 1996-01-13 aeb: merged in some text contributed by Melvin Smith
27 .\"   (msmith@falcon.mercer.peachnet.edu) and various other changes.
28 .\" Modified 1996-05-16 by Martin Schulze (joey@infodrom.north.de)
29 .\"
30 .\" Japanese Version Copyright (c) 1998 TACHIBANA Akira
31 .\"         all rights reserved.
32 .\" Translated 1998-05-28, TACHIBANA Akira <tati@tky.3web.ne.jp>
33 .\" Updated 2001-12-21, Kentaro Shirakata <argrath@ub32.org>
34 .\" Updated 2005-03-15, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
35 .\"
36 .TH PERROR 3 2007-07-26 "" "Linux Programmer's Manual"
37 .SH Ì¾Á°
38 perror \- ¥·¥¹¥Æ¥à¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¤ò½ÐÎϤ¹¤ë
39 .SH ½ñ¼°
40 .B #include <stdio.h>
41 .sp
42 .BI "void perror(const char *" s );
43 .sp
44 .B #include <errno.h>
45 .sp
46 .BI "const char *" sys_errlist [];
47 .br
48 .BI "int " sys_nerr ;
49 .br
50 .BI "int " errno ;
51 .sp
52 .in -4n
53 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
54 .RB ( feature_test_macros (7)
55 »²¾È):
56 .in
57 .sp
58 .IR sys_errlist ,
59 .IR sys_nerr :
60 _BSD_SOURCE
61 .SH ÀâÌÀ
62 ´Ø¿ô
63 .BR perror ()
64 ¤Ï¡¢¥·¥¹¥Æ¥à¥³¡¼¥ë¤ä¥é¥¤¥Ö¥é¥ê´Ø¿ô¤Î¸Æ¤Ó½Ð¤·¤Ë¤ª¤¤¤Æ¡¢ºÇ¸å¤ËȯÀ¸¤·¤¿
65 ¥¨¥é¡¼¤Ë´Ø¤¹¤ëÀâÌÀ¥á¥Ã¥»¡¼¥¸¤òÀ¸À®¤·¡¢É¸½à¥¨¥é¡¼½ÐÎϤ˽ÐÎϤ¹¤ë¡£
66 .RI ( s
67 ¤¬ NULL ¤Ç¤Ê¤¯¡¢
68 .I *s
69 ¤¬ NULL ¥Ð¥¤¥È (\(aq\\0\(aq) ¤Ç¤Ê¤¤¾ì¹ç¤Ë¤Ï) °ú¤­¿ô¤Îʸ»úÎó
70 .I s
71 ¤¬¤Þ¤º½ÐÎϤµ¤ì¡¢Â³¤¤¤Æ¥³¥í¥ó¡¢¶õÇò¤¬½ÐÎϤµ¤ì¡¢
72 ¤½¤ì¤«¤é¥á¥Ã¥»¡¼¥¸¤È²þ¹Ô¤¬½ÐÎϤµ¤ì¤ë¡£
73
74 ¤³¤Î¥á¥Ã¥»¡¼¥¸¤òºÇÂç¸Â³èÍѤ¹¤ë¤¿¤á¤Ë¤Ï¡¢°ú¤­¿ôʸ»úÎó¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿
75 ´Ø¿ô̾¤òÆþ¤ì¤Æ¤ª¤¯¤È¤è¤¤¡£
76 ¥¨¥é¡¼ÈÖ¹æ¤Ï³°ÉôÊÑ¿ô
77 .I errno
78 ¤«¤é¼èÆÀ¤µ¤ì¤ë¡£
79 .I errno
80 ¤Ï¥¨¥é¡¼¤¬È¯À¸¤·¤¿»þ¤ËÀßÄꤵ¤ì¡¢
81 À®¸ù¤·¤¿¸Æ¤Ó½Ð¤·¤Ç¤Ï¥¯¥ê¥¢¤µ¤ì¤Ê¤¤¡£
82
83 Âç°èÊÑ¿ô¤Î¥¨¥é¡¼¥ê¥¹¥È
84 .IR sys_errlist "[]"
85 ¤Ï
86 .I errno
87 ¤òź»ú¤È¤¹¤ëÇÛÎó¤Ç¡¢¤³¤ÎÇÛÎ󤫤é²þ¹Ô̵¤·¤Î¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¤¬¼èÆÀ¤µ¤ì¤ë¡£
88 ¥Æ¡¼¥Ö¥ë¤Ç¤ÎºÇÂç¤Î¥á¥Ã¥»¡¼¥¸ÈÖ¹æ¤Ï
89 .IR sys_nerr " \-1"
90 ¤È¤Ê¤ë¡£
91 ¤³¤Î¥Æ¡¼¥Ö¥ë¤òľÀÜ»²¾È¤¹¤ëºÝ¤Ë¤ÏÃí°Õ¤¹¤ë¤³¤È¡£¤Ê¤¼¤Ê¤é¡¢¿·¤·¤¤¥¨¥é¡¼Èֹ椬
92 .IR sys_errlist "[]"
93 ¤ËÄɲúѤȤϸ¤é¤Ê¤¤¤«¤é¤Ç¤¢¤ë¡£
94
95 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤¬¼ºÇÔ¤·¤¿¾ì¹ç¡¢Ä̾ÊÖ¤êÃͤȤ·¤Æ \-1 ¤¬Ê֤ꡢ
96 .I errno
97 ¤Ë¥¨¥é¡¼¤ò¼±Ê̤¹¤ëÃͤ¬ÀßÄꤵ¤ì¤ë (ÀßÄꤵ¤ì¤ë¥¨¥é¡¼ÈÖ¹æ¤Ï
98 .I <errno.h>
99 ¤Ëµ­ºÜ¤µ¤ì¤Æ¤¤¤ë)¡£
100 ¿¤¯¤Î¥é¥¤¥Ö¥é¥ê´Ø¿ô¤âƱÍͤÎÆ°ºî¤È¤Ê¤ë¡£
101 ´Ø¿ô
102 .BR perror ()
103 ¤Ï¡¢¤³¤Î¥¨¥é¡¼¥³¡¼¥É¤Î²ÄÆɤʥá¥Ã¥»¡¼¥¸¤Ø¤ÎÊÑ´¹¤ò¹Ô¤¦¡£
104 .I errno
105 ¤Ï¡¢¥é¥¤¥Ö¥é¥ê¸Æ¤Ó½Ð¤·¤¬À®¸ù¤·¤¿¸å¤Ë¤Ï̤ÄêµÁ¤Ç¤¢¤ë¤³¤È¤ËÃí°Õ¤¬É¬ÍפǤ¢¤ë:
106 ¤½¤Î¸Æ¤Ó½Ð¤·¼«¿È¤ÏÀ®¸ù¤·¤¿¤È¤·¤Æ¤â¡¢ÆâÉô¤Ç¸Æ¤Ó½Ð¤·¤¿Â¾¤Î¥é¥¤¥Ö¥é¥ê´Ø¿ô¤¬
107 ¼ºÇÔ¤·¤Æ¡¢¤½¤Î·ë²Ì¤ò¤³¤ÎÊÑ¿ô¤ËÀßÄꤹ¤ë¤³¤È¤¬¤¢¤ë¤«¤é¤À¡£
108 ¤è¤Ã¤Æ¡¢¼ºÇÔ¤·¤¿¸Æ¤Ó½Ð¤·¤Îľ¸å¤Ë
109 .BR perror ()
110 ¤ò¸Æ¤Ð¤Ê¤¤¾ì¹ç¤Ë¤Ï
111 .I errno
112 ¤ÎÃͤò
113 Êݸ¤·¤Æ¤ª¤«¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
114 .SH ½àµò
115 ´Ø¿ô
116 .BR perror ()
117 ¤È³°ÉôÊÑ¿ô
118 .I errno
119 .RB ( errno (3)
120 »²¾È) ¤Ï C89, 4.3BSD, POSIX.1-2001 ¤Ë½àµò¤·¤Æ¤¤¤ë¡£
121 ³°ÉôÊÑ¿ô
122 .I sys_nerr
123 ¤È
124 .I sys_errlist
125 ¤Ï BSD ¤Ë½àµò¤·¤Æ¤¤¤ë¡£
126 .SH Ãí°Õ
127 ³°ÉôÊÑ¿ô
128 .I sys_nerr
129 ¤È
130 .I sys_errlist
131 ¤Ï glibc ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë¤¬¡¢
132 .I <stdio.h>
133 ¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ë¡£
134 .\" .B _BSD_SOURCE
135 .\" ¤¬ÄêµÁ¤µ¤ì¤¿¾ì¹ç¤Ë¤Î¤ß¡¢¤³¤ì¤é¤ÎÊÑ¿ô¤ÏÄêµÁ¤µ¤ì¤ë¡£
136 .\" .B _GNU_SOURCE
137 .\" ¤¬ÄêµÁ¤µ¤ì¤¿¾ì¹ç¤Ï¡¢
138 .\" .I _sys_nerr
139 .\" ¤È
140 .\" .I _sys_errlist
141 .\" ¤È¤¤¤¦¥·¥ó¥Ü¥ë¤¬Ä󶡤µ¤ì¤ë¡£
142 .SH ´ØÏ¢¹àÌÜ
143 .BR err (3),
144 .BR errno (3),
145 .BR error (3),
146 .BR strerror (3)