Monday, December 3, 2007

System Call Error Codes

Error No.

Error

Description

1

EPERM


The process lacks sufficient permissions to perform the operation it is attempting to perform.

2

ENOENT


The process is attempting to access a file or directory that does not exist.

3

ESRCH

No such process exists.

4

EINTR

A system call was interrupted.

5

EIO


Some sort of (usually hardware-related) I/O error occurred.

6

ENXIO

The I/O device or address does not exist.

7

E2BIG


The argument list passed to an exec call was too long.

8

ENOEXEC


The format of a binary that a process attempted to execute was incorrect (such as trying to run a SPARC binary on an x86 processor).

9

EBADF

An invalid file number was passed to a function that opens/close/reads/writes a file.

10

ECHILD


The process had no child process on which to wait.

11

EAGAIN

A process attempted to perform non-blocking I/O when no input was available.

12

ENOMEM


Insufficient memory is available for the requested operation.

13

EACCESS

Access to a file or other resource would be denied.

14

EFAULT

A bad pointer (one that points to inaccessible memory) was passed to a system call.

15

ENOTBLK

A process attempted to mount a device that is not a block device.

16

EBUSY

A process attempted to mount a device that is already mounted or attempted to unmount a filesystem currently in use.

17

EEXIST

Returned when you try to create a file that already exists.

18

EXDEV

Returned by the link call if the source and destination files are not on the same filesystem.

19

ENODEV

A process attempted to use a filesystem type that the kernel does not support.

20

ENOTDIR

A directory component in a pathname is not, in fact, a directory.

21

EISDIR

The filename component of a pathname is a directory, not a filename.

22

EINVAL

A process passed an invalid argument to a system call.

23

ENFILE

The system has reached the maximum number of open files it supports.

24

EMFILE

The calling process cannot open any more files because it has already opened the maximum number allowed.

25

ENOTTY

A process attempted to do terminal style I/O on a device or file that is not a terminal. This error is the famous "not a typewriter" message.

26

ETXTBSY

A process attempted to open a binary or library file that is currently in use.

27

EFBIG

The calling process attempted to write a file longer than the system maximum or the process's resource limits permit.

28

ENOSPC

A filesystem or device is full.

29

ESPIPE

A process attempted to lseek on a non-seekable file.

30

EROFS

A process attempted to write on a read-only filesystem.

31

EMLINK

The file being linked has reached the maximum number of links allowed.

32

EPIPE

The read end of a pipe is closed and SIGPIPE is being ignored or trapped.

33

EDOM

Set by math functions when an argument exceeds the function's domain.

34

ERANGE

Set by math functions when the result of the function can't be represented by the function's return type.

36

ENAMETOOLONG

A path or filename is too long.

38

ENOSYS

The system call invoked has not been implemented.

39

ENOTEMPTY

A directory on which rmdir was called is not empty.

40

ELOOP

A path involves too long a chain of symbolic links.

No comments: