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 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
|
.\" Copyright (c) 1996 Andries Brouwer (aeb@cwi.nl)
.\"
.\" 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., 675 Mass Ave, Cambridge, MA 02139,
.\" USA.
.\"
.TH ERRNO 3 "30 March 1998" "" "Library functions"
.SH NAME
errno \- number of last error
.SH SYNOPSIS
#include <errno.h>
.sp
extern int errno;
.SH DESCRIPTION
The integer
.B errno
is set by system calls (and some library functions) to indicate
what went wrong. Its value is significant only when the call
returned an error (usually \-1), and a library function that does succeed
is allowed to change
.BR errno .
Sometimes, when \-1 is also a legal return value one has to zero
.B errno
before the call in order to detect possible errors.
\fBerrno\fR is defined by the ISO C standard to be a modifiable lvalue
of type \fBint\fR, and must not be explicitly declared; \fBerrno\fR
may be a macro. \fBerrno\fR is thread-local; setting it in one thread
does not affect its value in any other thread.
Valid error numbers are all non-zero; \fBerrno\fR is never set to zero
by any library function. All the error names specified by POSIX.1
must have distinct values.
POSIX.1 (1996 edition) lists the following symbolic error names. Of
these, \fBEDOM\fR and \fBERANGE\fR are in the ISO C standard. ISO C
Amendment 1 defines the additional error number \fBEILSEQ\fR for
coding errors in multibyte or wide characters.
.TP
.B E2BIG
Arg list too long
.TP
.B EACCES
Permission denied
.TP
.B EAGAIN
Resource temporarily unavailable
.TP
.B EBADF
Bad file descriptor
.TP
.B EBADMSG
Bad message
.TP
.B EBUSY
Resource busy
.TP
.B ECANCELED
Operation canceled
.TP
.B ECHILD
No child processes
.TP
.B EDEADLK
Resource deadlock avoided
.TP
.B EDOM
Domain error
.TP
.B EEXIST
File exists
.TP
.B EFAULT
Bad address
.TP
.B EFBIG
File too large
.TP
.B EINPROGRESS
Operation in progress
.TP
.B EINTR
Interrupted function call
.TP
.B EINVAL
Invalid argument
.TP
.B EIO
Input/output error
.TP
.B EISDIR
Is a directory
.TP
.B EMFILE
Too many open files
.TP
.B EMLINK
Too many links
.TP
.B EMSGSIZE
Inappropriate message buffer length
.TP
.B ENAMETOOLONG
Filename too long
.TP
.B ENFILE
Too many open files in system
.TP
.B ENODEV
No such device
.TP
.B ENOENT
No such file or directory
.TP
.B ENOEXEC
Exec format error
.TP
.B ENOLCK
No locks available
.TP
.B ENOMEM
Not enough space
.TP
.B ENOSPC
No space left on device
.TP
.B ENOSYS
Function not implemented
.TP
.B ENOTDIR
Not a directory
.TP
.B ENOTEMPTY
Directory not empty
.TP
.B ENOTSUP
Not supported
.TP
.B ENOTTY
Inappropriate I/O control operation
.TP
.B ENXIO
No such device or address
.TP
.B EPERM
Operation not permitted
.TP
.B EPIPE
Broken pipe
.TP
.B ERANGE
Result too large
.TP
.B EROFS
Read-only file system
.TP
.B ESPIPE
Invalid seek
.TP
.B ESRCH
No such process
.TP
.B ETIMEDOUT
Operation timed out
.TP
.B EXDEV
Improper link
.SH "SEE ALSO"
.BR perror (3),
.BR strerror (3)
|