errno.2

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 2 代码 · 共 375 行

2
375
字号
.\" SCCSID: @(#)errno.2	8.3	1/28/91.TH errno 2.de en.HP\\$1  \\$2  \\$3.br...SH Nameerrno \- introduction error numbers.SH Syntax#include <errno.h>.SH Description.NXR "errno variable"The.PN errnoexternal variable is set when an error occurs in a systemcall.  You can use the value stored in errno to obtain a more detaileddescription of the error than is given in the system call's returnvalue.The.PN errnovariable is not cleared on successful system calls, so you should checkits value only when an error is reported..SH Return ValuesMost system calls have one or more return values.An error condition is indicated by an otherwise impossible returnvalue.  This value is almost always \-1. All return codes and valuesfrom system call are of type.I int,unless otherwise noted..PPWhen an error occurs, most calls store one of thefollowing values, as defined in <errno.h>, in the errno variable:.NXR "errno error list".IP "\fR0\fP" 5 Unused..en 1 EPERM "Not ownerThis error indicatesan attempt to modify a file in some way forbiddenexcept to its owner or the superuser.It is also returned for attemptsby ordinary users to do thingsallowed only to the superuser..en 2 ENOENT "No such file or directoryThis error occurs when a file name is specifiedand the file should exist but does not, or when oneof the directories in a pathname does not exist..en 3 ESRCH "No such processThe process whose number was given to .PN kill and .PN ptrace does not exist or is already dead..en 4 EINTR "Interrupted system callAn asynchronous signal (such as interrupt or quit)that the program catches occurred during a system call.If execution resumesafter the asynchronous signal is processed,it will appear as if the interrupted system callreturned this error condition..en 5 EIO "I/O errorSome physical I/O error occurred during a.PN reador.PN write .This error may occuron a call following the one to which it actually applies..en 6 ENXIO "No such device or addressI/O on a special file refers to a subdevice that does notexist or to an area beyond the limits of the device.This error might also occur when an illegal tape driveunit number is selected or a disk pack is not loaded on a drive..en 7 E2BIG "Arg list too longAn argument list longer than 10240 bytesis presented to .PN execve ..en 8 ENOEXEC "Exec format errorA request is made to execute a filethat does not start with a valid magic number,although it has the appropriate permissions.For further information, see .MS a.out 5 ..en 9 EBADF "Bad file numberEither a file descriptor refers to noopen file or a read request is made for a file that is open onlyfor writing. Likewise, a write request made to a file open only forreading causes this error..en 10 ECHILD "No childrenThe program issued a.PN waitcall and the process has noactive or unwaited-for children..en 11 EAGAIN "No more processesIn a.I fork,the system's process table is fullor the user is not allowed to create any moreprocesses..en 12 ENOMEM "Not enough coreDuring an .PN execve or .PN brk ,a program asks for more core or swap space than the system isable to supply.A lack of swap space is normally a temporary condition.  However,a lack of coreis not a temporary condition; the maximum sizeof the text, data, and stack segments is a system parameter..en 13 EACCES "Permission deniedThe call attempts to access a file in some way forbiddenby the protection system..en 14 EFAULT "Bad addressThe system encountered a hardware fault in attempting toaccess the arguments of a system call..en 15 ENOTBLK "Block device requiredThe call specifies a plain file where a block device is required..en 16 EBUSY "Mount device busyThe call attempts to mount a device that was already mountedor to unmount a deviceon which there was an active file directory, anopen file, current directory, mounted-on file, or active text segment.Or,the call attempts to modify a partition table incorrectly.See the restrictions in .MS chpt 8 ..en 17 EEXIST "File existsAn existing file is mentioned in an inappropriate context..en 18 EXDEV "Cross-device linkThe call attempts to form a hard link to a file on another device..en 19 ENODEV "No such deviceThe call attempts to perform an invalid operation on a device, such aswrite to a read-only device..en 20 ENOTDIR "Not a directoryA file that is not a directory is specified where a directoryis required,for example, in a pathname oras an argument to .PN chdir ..en 21 EISDIR "Is a directoryThe call attempts to write on a directory..en 22 EINVAL "Invalid argumentAn invalid argument is specified.For example, the call might specify dismounting a device that is not mounted or reading or writing a file for which.PN seekhas generated a negative pointer.This error is also set by math functions, as described in the .MS intro 3 reference page..en 23 ENFILE "File table overflowThe system's table of open files is full,and temporarily no more.PN opencalls can be processed..en 24 EMFILE "Too many open filesThe process has opened too many files. The customary configuration limit is 64 files per process..en 25 ENOTTY "Not a typewriterThe file named in an .PN ioctl call is not a terminal or one of the otherdevices to which the call applies..en 26 ETXTBSY "Text file busyThe call attempts to execute a pure-procedureprogram that is currently open for writingor reading.Or, the call attempts to open for writing a pure-procedureprogram that is being executed..en 27 EFBIG "File too largeThe size of a file exceeds the maximum (about.if t 10\u\s-29\s+2\d.if n 1.0E9bytes)..en 28 ENOSPC "No space left on deviceA device runs out of space during a write to an ordinary file..en 29 ESPIPE "Illegal seekAn .PN lseek call specifies a pipe or other device that .PN lseekdoes not support..en 30 EROFS "Restricted operation on a file systemThe call attempts to access a file or directoryon a mounted file system when that permission has been revoked. For example, the call attempts to write a file on a file system mounted read only..en 31 EMLINK "Too many linksThe call attempts to make more than {LINK_MAX} hard links to a file..en 32 EPIPE "Broken pipeThe call attempts to write on a pipe or socket for which there is no processto read the data.This condition normally generates a signal;the error is returned if the signal is ignored..en 33 EDOM "Argument too large"The argument of a function in the math package (which is described inthe.I ULTRIX Reference Pages, Section 3: Subroutines) is out of the domain of the function..en 34 ERANGE "Result too largeThe value of a function in the math package (which is described in the.I ULTRIX Reference Pages, Section 3: Subroutines) is unrepresentable within machine precision..en 35 EWOULDBLOCK "Operation would block"The call attempts an operation that would cause a process to block on an object in nonblocking mode.For further information, see .MS ioctl 2 ..en 36 EINPROGRESS "Operation now in progress"The call is performing an operation that takes a long time to complete, such asa .PN connect call, on a nonblocking object.For further information, see .MS ioctl 2 ..en 37 EALREADY "Operation already in progress"The call attempts an operation on a nonblocking object that alreadyhas an operation in progress..en 38 ENOTSOCK "Socket operation on non-socket"The call attempts to perform a socket-specific operation on anentity that is not a socket..en 39 EDESTADDRREQ "Destination address required"A required address is omitted from an operation on a socket..en 40 EMSGSIZE "Message too long"A message sent on a socket is larger than the internal message buffer..en 41 EPROTOTYPE "Protocol wrong type for socket"A protocol is specified that does not support the semantics of thesocket type requested. For example, you cannot use the ARPA InternetUDP protocol with type SOCK_STREAM..en 42 ENOPROTOOPT "Protocol not available"A bad option was specified in a .PN getsockopt or .PN setsockopt call..en 43 EPROTONOSUPPORT "Protocol not supported"The protocol has not been configured into thesystem or an implementation for it does not exist..en 44 ESOCKTNOSUPPORT "Socket type not supported"The support for the socket type has not been configured into thesystem or an implementation for it does not exist..en 45 EOPNOTSUPP "Error\-operation not supported"The call attempts an unsupported operation, such as trying to accept a connection on a datagram socket..en 46 EPFNOSUPPORT "Protocol family not supported"The protocol family has not been configured into thesystem or an implementation for it does not exist..en 47 EAFNOSUPPORT "Address family not supported by protocol family"An address incompatible with the requested protocol is specified.For example, you cannot use PUPInternet addresses with ARPA Internet protocols..en 48 EADDRINUSE "Address already in use"The call attempts to use an address that is already in use. Each addresscan be used only once.  .en 49 EADDRNOTAVAIL "Cannot assign requested address"The call attempts to create a socket with anaddress not on this machine..en 50 ENETDOWN "Network is down"A socket operation encountered a network that is not operating..en 51 ENETUNREACH "Network is unreachable"A socket operation attempts to reach an unreachable network..en 52 ENETRESET "Network dropped connection on reset"The host to which the program was connected to crashed and rebooted..en 53 ECONNABORTED "Software caused connection abort"A connection abort has occurred internal to your host machine..en 54 ECONNRESET "Connection reset by peer"A connection has been forcibly closed by a peer.  This error usuallyresults from the peer executing a .PN shutdown  call..en 55 ENOBUFS "No buffer space available"The system lacks sufficient buffer space to perform an operation on asocket or pipe..en 56 EISCONN "Socket is already connected"A.PN connectrequest names an already connected socket, ora.PN sendtoor.PN sendmsgrequest on a connected socket specifies a destinationother than the connected party..en 57 ENOTCONN "Socket is not connected"A request to send or receive data could not complete becausethe socket is not connected..en 58 ESHUTDOWN "Cannot send after socket shutdown"A request to send data could not complete because the sockethas already been shut down with a previous .PN shutdown  call..en 59 ETOOMANYREFS "Too many references: cannot splice".en 60 ETIMEDOUT "Connection timed out"A.PN connectrequest failed because the connected party did notproperly respond after a period of time.  (The timeoutperiod is dependent on the communication protocol.)For example, this erroroccurs when an NFS file system is mounted with the ``soft,''option and the server is not responding to file operationrequests..en 61 ECONNREFUSED "Connection refused"No connection could be made because the target machine activelyrefused it.  This error usually results from trying to connectto a service that is inactive on the remote host..en 62 ELOOP "Too many levels of symbolic links"A pathname lookup involves more than eight symbolic links..en 63 ENAMETOOLONG "File name too long"A component of a path name exceeds 255 characters, or an entirepath name exceeds 1023 characters..en 64 EHOSTDOWN "Host is down" A socket operation has failed because the destination host is down..en 65 EHOSTUNREACH "No route to host"A socket operation attempts to reach an unreachable host..en 66 ENOTEMPTY "Directory not empty"A directory with entries other than dot (.) and dot-dot (..) is specified in a .PN rmdir or .PN rename call..en 67 EPROCLIM "Too many processes"Creating the process would cause the user to exceed the number of user processes that areavailable.  The .I maxuprcoption in the configuration file controls this limit..en 68 EUSERS "Too many users"A login process would exceed themaximum allowable login processes for which the system islicensed.  .en 69 EDQUOT "Disk quota exceeded"A.PN writeto an ordinary file, the creation of a directory or symboliclink, or the creation of a directory entry has failed because theuser's quota of disk blocks is exhausted. Or, the allocationof an inode for a newly created file has failed because the user'squota of inodes is exhausted..en 70 ESTALE "Stale NFS file handle" Information used by the operatingsystem to identify a file in an NFS file system that is no longer  valid.  This error code results from operating on a remote filethat no longer exists on the server or resides in a file systemthat has been moved to a different device on the server..en 71 EREMOTE "Too many levels of remote in path"A remote NFS client has requested an operation on a filethat is remote to the server as well.  An attempt has been made to mount an NFS remote file system that is not local to thespecified server.  This error code cannot occur except in responseto a failed .PN mount call. .en 72 ENOMSG "No message of desired type"An attempt was made to receive a message of a type that does notexist on the specified message queue.  For further information, see.MS msgop 2 ..en 73 EIDRM "Identifier removed"In semaphores, shared memory, or message queues, the callertried to access the identifier after it had been removedfrom the system..en 74 EALIGN "Alignment error"Alignment error of some type has occurred, for example, cluster,page, or block..en 75 ENOLCK "No locks available"A file locking request could not be fulfilled because a systemlimit on the number of active locks would have been exceeded..en 76 ENOSYS "Function not implemented"The requested function is not available in ULTRIX.  Included forPOSIX compatibility only..SH See Also.MS perror 3

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?