blob: cf5f8540da94177089151a72884b424550effba3 [file] [log] [blame]
Guido van Rossumd61ad531996-07-30 18:21:37 +00001\section{Standard Module \sectcode{errno}}
2\stmodindex{errno}
3
Fred Drake19479911998-02-13 06:58:54 +00004\setindexsubitem{(in module errno)}
Guido van Rossumd61ad531996-07-30 18:21:37 +00005
6This module makes available standard errno system symbols.
Guido van Rossum91f87ca1996-07-30 20:45:45 +00007The value of each symbol is the corresponding integer value.
Guido van Rossum5de64881997-11-18 15:27:51 +00008The names and descriptions are borrowed from \file{linux/include/errno.h},
Guido van Rossumd61ad531996-07-30 18:21:37 +00009which should be pretty all-inclusive. Of the following list, symbols
10that are not used on the current platform are not defined by the
11module.
12
Guido van Rossum5de64881997-11-18 15:27:51 +000013The module also defines the dictionary variable \code{errorcode} which
14maps numeric error codes back to their symbol names, so that e.g.
15\code{errno.errorcode[errno.EPERM] == 'EPERM'}. To translate a
16numeric error code to an error message, use \code{os.strerror()}.
17
Guido van Rossumd61ad531996-07-30 18:21:37 +000018Symbols available can include:
19\begin{datadesc}{EPERM} Operation not permitted \end{datadesc}
20\begin{datadesc}{ENOENT} No such file or directory \end{datadesc}
21\begin{datadesc}{ESRCH} No such process \end{datadesc}
22\begin{datadesc}{EINTR} Interrupted system call \end{datadesc}
23\begin{datadesc}{EIO} I/O error \end{datadesc}
24\begin{datadesc}{ENXIO} No such device or address \end{datadesc}
25\begin{datadesc}{E2BIG} Arg list too long \end{datadesc}
26\begin{datadesc}{ENOEXEC} Exec format error \end{datadesc}
27\begin{datadesc}{EBADF} Bad file number \end{datadesc}
28\begin{datadesc}{ECHILD} No child processes \end{datadesc}
29\begin{datadesc}{EAGAIN} Try again \end{datadesc}
30\begin{datadesc}{ENOMEM} Out of memory \end{datadesc}
31\begin{datadesc}{EACCES} Permission denied \end{datadesc}
32\begin{datadesc}{EFAULT} Bad address \end{datadesc}
33\begin{datadesc}{ENOTBLK} Block device required \end{datadesc}
34\begin{datadesc}{EBUSY} Device or resource busy \end{datadesc}
35\begin{datadesc}{EEXIST} File exists \end{datadesc}
36\begin{datadesc}{EXDEV} Cross-device link \end{datadesc}
37\begin{datadesc}{ENODEV} No such device \end{datadesc}
38\begin{datadesc}{ENOTDIR} Not a directory \end{datadesc}
39\begin{datadesc}{EISDIR} Is a directory \end{datadesc}
40\begin{datadesc}{EINVAL} Invalid argument \end{datadesc}
41\begin{datadesc}{ENFILE} File table overflow \end{datadesc}
42\begin{datadesc}{EMFILE} Too many open files \end{datadesc}
43\begin{datadesc}{ENOTTY} Not a typewriter \end{datadesc}
44\begin{datadesc}{ETXTBSY} Text file busy \end{datadesc}
45\begin{datadesc}{EFBIG} File too large \end{datadesc}
46\begin{datadesc}{ENOSPC} No space left on device \end{datadesc}
47\begin{datadesc}{ESPIPE} Illegal seek \end{datadesc}
48\begin{datadesc}{EROFS} Read-only file system \end{datadesc}
49\begin{datadesc}{EMLINK} Too many links \end{datadesc}
50\begin{datadesc}{EPIPE} Broken pipe \end{datadesc}
51\begin{datadesc}{EDOM} Math argument out of domain of func \end{datadesc}
52\begin{datadesc}{ERANGE} Math result not representable \end{datadesc}
53\begin{datadesc}{EDEADLK} Resource deadlock would occur \end{datadesc}
54\begin{datadesc}{ENAMETOOLONG} File name too long \end{datadesc}
55\begin{datadesc}{ENOLCK} No record locks available \end{datadesc}
56\begin{datadesc}{ENOSYS} Function not implemented \end{datadesc}
57\begin{datadesc}{ENOTEMPTY} Directory not empty \end{datadesc}
58\begin{datadesc}{ELOOP} Too many symbolic links encountered \end{datadesc}
59\begin{datadesc}{EWOULDBLOCK} Operation would block \end{datadesc}
60\begin{datadesc}{ENOMSG} No message of desired type \end{datadesc}
61\begin{datadesc}{EIDRM} Identifier removed \end{datadesc}
62\begin{datadesc}{ECHRNG} Channel number out of range \end{datadesc}
63\begin{datadesc}{EL2NSYNC} Level 2 not synchronized \end{datadesc}
64\begin{datadesc}{EL3HLT} Level 3 halted \end{datadesc}
65\begin{datadesc}{EL3RST} Level 3 reset \end{datadesc}
66\begin{datadesc}{ELNRNG} Link number out of range \end{datadesc}
67\begin{datadesc}{EUNATCH} Protocol driver not attached \end{datadesc}
68\begin{datadesc}{ENOCSI} No CSI structure available \end{datadesc}
69\begin{datadesc}{EL2HLT} Level 2 halted \end{datadesc}
70\begin{datadesc}{EBADE} Invalid exchange \end{datadesc}
71\begin{datadesc}{EBADR} Invalid request descriptor \end{datadesc}
72\begin{datadesc}{EXFULL} Exchange full \end{datadesc}
73\begin{datadesc}{ENOANO} No anode \end{datadesc}
74\begin{datadesc}{EBADRQC} Invalid request code \end{datadesc}
75\begin{datadesc}{EBADSLT} Invalid slot \end{datadesc}
76\begin{datadesc}{EDEADLOCK} File locking deadlock error \end{datadesc}
77\begin{datadesc}{EBFONT} Bad font file format \end{datadesc}
78\begin{datadesc}{ENOSTR} Device not a stream \end{datadesc}
79\begin{datadesc}{ENODATA} No data available \end{datadesc}
80\begin{datadesc}{ETIME} Timer expired \end{datadesc}
81\begin{datadesc}{ENOSR} Out of streams resources \end{datadesc}
82\begin{datadesc}{ENONET} Machine is not on the network \end{datadesc}
83\begin{datadesc}{ENOPKG} Package not installed \end{datadesc}
84\begin{datadesc}{EREMOTE} Object is remote \end{datadesc}
85\begin{datadesc}{ENOLINK} Link has been severed \end{datadesc}
86\begin{datadesc}{EADV} Advertise error \end{datadesc}
87\begin{datadesc}{ESRMNT} Srmount error \end{datadesc}
88\begin{datadesc}{ECOMM} Communication error on send \end{datadesc}
89\begin{datadesc}{EPROTO} Protocol error \end{datadesc}
90\begin{datadesc}{EMULTIHOP} Multihop attempted \end{datadesc}
91\begin{datadesc}{EDOTDOT} RFS specific error \end{datadesc}
92\begin{datadesc}{EBADMSG} Not a data message \end{datadesc}
93\begin{datadesc}{EOVERFLOW} Value too large for defined data type \end{datadesc}
94\begin{datadesc}{ENOTUNIQ} Name not unique on network \end{datadesc}
95\begin{datadesc}{EBADFD} File descriptor in bad state \end{datadesc}
96\begin{datadesc}{EREMCHG} Remote address changed \end{datadesc}
97\begin{datadesc}{ELIBACC} Can not access a needed shared library \end{datadesc}
98\begin{datadesc}{ELIBBAD} Accessing a corrupted shared library \end{datadesc}
99\begin{datadesc}{ELIBSCN} .lib section in a.out corrupted \end{datadesc}
100\begin{datadesc}{ELIBMAX} Attempting to link in too many shared libraries \end{datadesc}
101\begin{datadesc}{ELIBEXEC} Cannot exec a shared library directly \end{datadesc}
102\begin{datadesc}{EILSEQ} Illegal byte sequence \end{datadesc}
103\begin{datadesc}{ERESTART} Interrupted system call should be restarted \end{datadesc}
104\begin{datadesc}{ESTRPIPE} Streams pipe error \end{datadesc}
105\begin{datadesc}{EUSERS} Too many users \end{datadesc}
106\begin{datadesc}{ENOTSOCK} Socket operation on non-socket \end{datadesc}
107\begin{datadesc}{EDESTADDRREQ} Destination address required \end{datadesc}
108\begin{datadesc}{EMSGSIZE} Message too long \end{datadesc}
109\begin{datadesc}{EPROTOTYPE} Protocol wrong type for socket \end{datadesc}
110\begin{datadesc}{ENOPROTOOPT} Protocol not available \end{datadesc}
111\begin{datadesc}{EPROTONOSUPPORT} Protocol not supported \end{datadesc}
112\begin{datadesc}{ESOCKTNOSUPPORT} Socket type not supported \end{datadesc}
113\begin{datadesc}{EOPNOTSUPP} Operation not supported on transport endpoint \end{datadesc}
114\begin{datadesc}{EPFNOSUPPORT} Protocol family not supported \end{datadesc}
115\begin{datadesc}{EAFNOSUPPORT} Address family not supported by protocol \end{datadesc}
116\begin{datadesc}{EADDRINUSE} Address already in use \end{datadesc}
117\begin{datadesc}{EADDRNOTAVAIL} Cannot assign requested address \end{datadesc}
118\begin{datadesc}{ENETDOWN} Network is down \end{datadesc}
119\begin{datadesc}{ENETUNREACH} Network is unreachable \end{datadesc}
120\begin{datadesc}{ENETRESET} Network dropped connection because of reset \end{datadesc}
121\begin{datadesc}{ECONNABORTED} Software caused connection abort \end{datadesc}
122\begin{datadesc}{ECONNRESET} Connection reset by peer \end{datadesc}
123\begin{datadesc}{ENOBUFS} No buffer space available \end{datadesc}
124\begin{datadesc}{EISCONN} Transport endpoint is already connected \end{datadesc}
125\begin{datadesc}{ENOTCONN} Transport endpoint is not connected \end{datadesc}
126\begin{datadesc}{ESHUTDOWN} Cannot send after transport endpoint shutdown \end{datadesc}
127\begin{datadesc}{ETOOMANYREFS} Too many references: cannot splice \end{datadesc}
128\begin{datadesc}{ETIMEDOUT} Connection timed out \end{datadesc}
129\begin{datadesc}{ECONNREFUSED} Connection refused \end{datadesc}
130\begin{datadesc}{EHOSTDOWN} Host is down \end{datadesc}
131\begin{datadesc}{EHOSTUNREACH} No route to host \end{datadesc}
132\begin{datadesc}{EALREADY} Operation already in progress \end{datadesc}
133\begin{datadesc}{EINPROGRESS} Operation now in progress \end{datadesc}
134\begin{datadesc}{ESTALE} Stale NFS file handle \end{datadesc}
135\begin{datadesc}{EUCLEAN} Structure needs cleaning \end{datadesc}
136\begin{datadesc}{ENOTNAM} Not a XENIX named type file \end{datadesc}
137\begin{datadesc}{ENAVAIL} No XENIX semaphores available \end{datadesc}
138\begin{datadesc}{EISNAM} Is a named type file \end{datadesc}
139\begin{datadesc}{EREMOTEIO} Remote I/O error \end{datadesc}
140\begin{datadesc}{EDQUOT} Quota exceeded \end{datadesc}
141