1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
|
.\" Copyright (c) 1994 Michael Haardt (michael@moria.de), 1994-06-04
.\" Copyright (c) 1995 Michael Haardt
.\" (michael@cantor.informatik.rwth-aachen.de), 1995-03-16
.\" Copyright (c) 1996 Andries Brouwer (aeb@cwi.nl), 1996-01-13
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" The GNU General Public License's references to "object code"
.\" and "executables" are to be interpreted as the output of any
.\" document formatting or typesetting system, including
.\" intermediate and printed output.
.\"
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
.\" License along with this manual; if not, write to the Free
.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
.\" USA.
.\"
.\" 1996-01-13 aeb: merged in some text contributed by Melvin Smith
.\" (msmith@falcon.mercer.peachnet.edu) and various other changes.
.\" Modified 1996-05-16 by Martin Schulze (joey@infodrom.north.de)
.\"
.\" Japanese Version Copyright (c) 1998 TACHIBANA Akira
.\" all rights reserved.
.\" Translated 1998-05-28, TACHIBANA Akira <tati@tky.3web.ne.jp>
.\" Updated 2001-12-21, Kentaro Shirakata <argrath@ub32.org>
.\" Updated 2005-03-15, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
.\"
.TH PERROR 3 2001-12-14 "" "Library functions"
.SH ̾
perror \- ƥ२顼åϤ
.SH
.B #include <stdio.h>
.sp
.BI "void perror(const char " *s );
.sp
.B #include <errno.h>
.sp
.BI "const char *" sys_errlist [];
.br
.BI "int " sys_nerr ;
.br
.BI "int " errno ;
.SH
ؿ
.BR perror ()
ϡƥॳ饤֥ؿθƤӽФˤơǸȯ
顼˴ؤåɸ२顼Ϥ˽Ϥ롣
.RI ( s
NULL Ǥʤ
.RI * s
NULL Х ('\\0') Ǥʤˤ) ʸ
.I s
ޤϤ졢³ƥϤ졢
줫åȲԤϤ롣
Υå³Ѥ뤿ˤϡʸ˥顼ȯ
ؿ̾ƤȤ褤
顼ֹϳѿ
.I errno
롣
.I errno
ϥ顼ȯꤵ졢顼ȯʤƤӽФǤ
ꥢʤ
ѿΥ顼ꥹ
.IR sys_errlist "[]"
.I errno
źȤǡ̵Υ顼å롣
ơ֥ǤκΥåֹ
.IR sys_nerr " \-1"
Ȥʤ롣
Υơ֥ľܻȤݤˤդ뤳ȡʤʤ顢顼ֹ椬
.IR sys_errlist "[]"
ɲúѤȤϸ¤ʤǤ롣
ƥॳ뤬Ԥ硢֤̾ͤȤ \-1 ֤ꡢ
.I errno
˥顼̤ͤꤵ (ꤵ륨顼ֹ
.IR "<errno.h>"
˵ܤƤ)
¿Υ饤֥ؿƱͤưȤʤ롣
ؿ
.BR perror ()
ϡΥ顼ɤβɤʥåؤѴԤ
.I errno
ϡ饤֥ƤӽФˤ̤Ǥ뤳ȤդɬפǤ:
θƤӽФȤȤƤ⡢ǸƤӽФ¾Υ饤֥ؿ
Ԥơη̤ѿꤹ뤳Ȥ뤫
äơԤƤӽФľ
.BR perror ()
ƤФʤˤ
.I errno
ͤ
¸ƤʤФʤʤ
.SH
ؿ
.BR perror ()
ȳѿ
.I errno
.RB ( errno (3)
) C89, 4.3BSD, POSIX.1-2001 ˽Ƥ롣
ѿ
.I sys_nerr
.I sys_errlist
BSD ˽Ƥ롣
.SH
ѿ
.I sys_nerr
.I sys_errlist
glibc Ƥ뤬
.I <stdio.h>
˴ޤޤƤ롣
.\" _BSD_SOURCE 줿ˤΤߡѿ롣
.\" _GNU_SOURCE 줿ϡ
.\" .I _sys_nerr
.\"
.\" .I _sys_errlist
.\" Ȥܥ뤬롣
.SH Ϣ
.BR err (3),
.BR errno (3),
.BR error (3),
.BR strerror (3)
|