next up previous index
Next: System Panics Up: Appendix A: Making System Previous: System Call Interface   Index

System Call Error Codes

The following codes are taken from <sys/errno.h>. The codes up to EPERM are the same values as those defined by ORCA/C for compatibility reasons. Error conditions are usually reported by system calls by returning a -1 (word) or NULL (long) value. Which error codes can be expected from a particular call are detailed in the errors section in the appropriate manual page.

Domain error. Basically an undefined error code.
Range error. A value passed to a system call was too large, too small, or illegal.
Not enough memory. The kernel could not allocate enough memory to complete the requested operation.
No such file or directory. The file specified could not be found.
I/O error. An error occurred trying to perform an I/O operation, such as that caused by bad media. It also refers to a disk error not covered by the other errno codes.
Invalid argument. An argument to a system call was invalid in some way.
Bad file descriptor. The file descriptor passed to the kernel does not represent an open file.
Too many files are open. The kernel cannot open any more files for this process; it's open file table is full. Close some other open files and retry the operation.
Access bits prevent the operation. One of the access bit settings (delete, rename, read, write) associated with the file does not allow the requested operation.
The file exists. An attempt to create a new file with the same name as an existing file results in this error.
No space on device. There is not enough room on the requested device to complete the operation. This is usually indicative of a full disk.
Not owner. Not yet used in GNO.
No such process. The process ID specified does not refer to an active process. Possibly the process terminated earlier.
Interrupted system call. Certain system calls can be interrupted by signals. In cases where the user has specified that those calls not be automatically restarted, the call will return this error.
Arg list too long. Too many arguments were specified in an _execve(2) call.
Exec format error. The file specified is not in an executable format (OMF load file).
No children. This error is returned by wait(2) when there are no child processes left running.
No more processes. The process table is full, the fork(2) cannot complete.
Not a directory. One of the elements in a pathname refers to a file which is not a directory.
Not a terminal. The file descriptor passed to an ioctl(2) or job control call does not refer to a terminal file.
Broken pipe. If a process attempts to write on a pipe with no readers, and has blocked or ignored SIGPIPE, this error is returned by the write operation.
Illegal seek. Similar to ENOTBLK, but specific for pipes.
Not a block device. An attempt to perform an operation on a character device that only makes sense on a block device.

next up previous index
Next: System Panics Up: Appendix A: Making System Previous: System Call Interface   Index