Name already in use

Errno. h – Man Page

system error numbers


This manual page is part of the POSIX Programmer’s Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.


Some of the functionality described on this reference page extends the ISO C standard. Any conflict between the requirements described here and the ISO C standard is unintentional. This volume of POSIX.1-2017 defers to the ISO C standard.

Argument list too long.

Address in use.

Address not available.

Address family not supported.

Connection already in progress.

Bad file descriptor.

Device or resource busy.

No child processes.

Resource deadlock would occur.

Destination address required.

Mathematics argument out of domain of function.

File too large.

Host is unreachable.

Illegal byte sequence.

Operation in progress.

Socket is connected.

Is a directory.

Too many levels of symbolic links.

File descriptor value too large.

Too many links.

Message too large.

Filename too long.

Network is down.

Connection aborted by network.

Too many files open in system.

No buffer space available.

No message is available on the STREAM head read queue.

No such device.

No such file or directory.

Executable file format error.

No locks available.

Not enough space.

No message of the desired type.

Protocol not available.

No space left on device.

No STREAM resources.


Functionality not supported.

The socket is not connected.

Not a directory or a symbolic link to a directory.

Directory not empty.

State not recoverable.

Not a socket.

Inappropriate I/O control operation.

No such device or address.

Value too large to be stored in data type.

Previous owner died.

Operation not permitted.

Protocol not supported.

Protocol wrong type for socket.

Result too large.

Read-only file system.

No such process.

Stream ioctl() timeout.

Text file busy.

Application Usage

Additional error numbers may be defined on conforming systems; see the System Interfaces volume of POSIX.1-2017.

See Also

The System Interfaces volume of POSIX.1-2017, Section 2.3, Error Numbers


Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see .

Referenced By

2017 IEEE/The Open Group POSIX Programmer’s Manual

Errno – Man Page

number of last error

Standard C library (libc, -lc)

Читайте также:  Активатор windows 10 код ошибки 0xc004f074

The value in errno is significant only when the return value of the call indicated an error (i.e., -1 from most system calls; -1 or NULL from most library functions); a function that succeeds is allowed to change errno. The value of errno is never set to zero by any system call or library function.

For some system calls and library functions (e.g., getpriority(2)), -1 is a valid return on success. In such cases, a successful return can be distinguished from an error return by setting errno to zero before the call, and then, if the call returns a status that indicates that an error may have occurred, checking to see if errno has a nonzero value.

errno is defined by the ISO C standard to be a modifiable lvalue of type int, and must not be explicitly declared; errno may be a macro. errno is thread-local; setting it in one thread does not affect its value in any other thread.

The error numbers that correspond to each symbolic name vary across UNIX systems, and even across different architectures on Linux. Therefore, numeric values are not included as part of the list of error names below. The perror(3) and strerror(3) functions can be used to convert these names to corresponding textual error messages.

On any particular Linux system, one can obtain a list of all symbolic error names and the corresponding error numbers using the errno(1) command (part of the moreutils package):

$ errno 2
ENOENT 2 No such file or directory
$ errno ESRCH
ESRCH 3 No such process
$ errno -s permission
EACCES 13 Permission denied

The name is defined by POSIX.1-2001, and is defined in later POSIX.1 versions, unless otherwise indicated.

The name is defined in POSIX.1-2008, but was not present in earlier POSIX.1 standards.

The name is defined by C99.

Below is a list of the symbolic error names that are defined on Linux:

Argument list too long (POSIX.1-2001).

Permission denied (POSIX.1-2001).

Address already in use (POSIX.1-2001).

Address not available (POSIX.1-2001).

Address family not supported (POSIX.1-2001).

Connection already in progress (POSIX.1-2001).

Bad file descriptor (POSIX.1-2001).

File descriptor in bad state.

Bad message (POSIX.1-2001).

Invalid request descriptor.

Invalid request code.

Device or resource busy (POSIX.1-2001).

Operation canceled (POSIX.1-2001).

No child processes (POSIX.1-2001).

Channel number out of range.

Communication error on send.

Connection aborted (POSIX.1-2001).

Connection refused (POSIX.1-2001).

Connection reset (POSIX.1-2001).

Resource deadlock avoided (POSIX.1-2001).

Читайте также:  Что делать если в геншине код ошибки 31 4302

On most architectures, a synonym for EDEADLK. On some architectures (e.g., Linux MIPS, PowerPC, SPARC), it is a separate error code “File locking deadlock error”.

Destination address required (POSIX.1-2001).

Mathematics argument out of domain of function (POSIX.1, C99).

Disk quota exceeded (POSIX.1-2001).

File exists (POSIX.1-2001).

Bad address (POSIX.1-2001).

File too large (POSIX.1-2001).

Host is down.

Host is unreachable (POSIX.1-2001).

Memory page has hardware error.

Identifier removed (POSIX.1-2001).

Invalid or incomplete multibyte or wide character (POSIX.1, C99).

The text shown here is the glibc error description; in POSIX.1, this error is described as “Illegal byte sequence”.

Operation in progress (POSIX.1-2001).

Interrupted function call (POSIX.1-2001); see signal(7).

Invalid argument (POSIX.1-2001).

Input/output error (POSIX.1-2001).

Socket is connected (POSIX.1-2001).

Is a directory (POSIX.1-2001).

Is a named type file.

Key has expired.

Key was rejected by service.

Key has been revoked.

Level 2 halted.

Level 2 not synchronized.

Level 3 halted.

Level 3 reset.

.lib section in a.out corrupted

Link number out of range.

Too many levels of symbolic links (POSIX.1-2001).

Wrong medium type.

Too many open files (POSIX.1-2001). Commonly caused by exceeding the RLIMIT_NOFILE resource limit described in getrlimit(2). Can also be caused by exceeding the limit specified in /proc/sys/fs/nr_open.

Too many links (POSIX.1-2001).

Message too long (POSIX.1-2001).

Multihop attempted (POSIX.1-2001).

Filename too long (POSIX.1-2001).

Network is down (POSIX.1-2001).

Connection aborted by network (POSIX.1-2001).

Network unreachable (POSIX.1-2001).

Too many open files in system (POSIX.1-2001). On Linux, this is probably a result of encountering the /proc/sys/fs/file-max limit (see proc(5)).

No buffer space available (POSIX.1 (XSI STREAMS option)).

The named attribute does not exist, or the process has no access to this attribute; see xattr(7).

In POSIX.1-2001 (XSI STREAMS option), this error was described as “No message is available on the STREAM head read queue”.

No such device (POSIX.1-2001).

No such file or directory (POSIX.1-2001).

Typically, this error results when a specified pathname does not exist, or one of the components in the directory prefix of a pathname does not exist, or the specified pathname is a dangling symbolic link.

Exec format error (POSIX.1-2001).

Required key not available.

No locks available (POSIX.1-2001).

Link has been severed (POSIX.1-2001).

No medium found.

Not enough space/cannot allocate memory (POSIX.1-2001).

No message of the desired type (POSIX.1-2001).

Machine is not on the network.

Package not installed.

Protocol not available (POSIX.1-2001).

No space left on device (POSIX.1-2001).

No STREAM resources (POSIX.1 (XSI STREAMS option)).

Читайте также:  Диагностический код слева от него будет английским кодом неисправности

Not a STREAM (POSIX.1 (XSI STREAMS option)).

Function not implemented (POSIX.1-2001).

The socket is not connected (POSIX.1-2001).

Not a directory (POSIX.1-2001).

Directory not empty (POSIX.1-2001).

State not recoverable (POSIX.1-2008).

Not a socket (POSIX.1-2001).

Operation not supported (POSIX.1-2001).

Inappropriate I/O control operation (POSIX.1-2001).

Name not unique on network.

No such device or address (POSIX.1-2001).

Operation not supported on socket (POSIX.1-2001).

(ENOTSUP and EOPNOTSUPP have the same value on Linux, but according to POSIX.1 these error values should be distinct.)

Value too large to be stored in data type (POSIX.1-2001).

Owner died (POSIX.1-2008).

Operation not permitted (POSIX.1-2001).

Protocol family not supported.

Broken pipe (POSIX.1-2001).

Protocol error (POSIX.1-2001).

Protocol not supported (POSIX.1-2001).

Protocol wrong type for socket (POSIX.1-2001).

Result too large (POSIX.1, C99).

Remote address changed.

Object is remote.

Remote I/O error.

Interrupted system call should be restarted.

Operation not possible due to RF-kill.

Read-only filesystem (POSIX.1-2001).

Cannot send after transport endpoint shutdown.

Invalid seek (POSIX.1-2001).

Socket type not supported.

No such process (POSIX.1-2001).

Stale file handle (POSIX.1-2001).

This error can occur for NFS and for other filesystems.

Streams pipe error.

Timer expired (POSIX.1 (XSI STREAMS option)).

(POSIX.1 says “STREAM ioctl(2) timeout”.)

Too many references: cannot splice.

Text file busy (POSIX.1-2001).

Structure needs cleaning.

Protocol driver not attached.

Invalid cross-device link (POSIX.1-2001).


A common mistake is to do

where errno no longer needs to have the value it had upon return from somecall() (i.e., it may have been changed by the printf(3)). If the value of errno should be preserved across a library call, it must be saved:

Note that the POSIX threads APIs do not set errno on error. Instead, on failure they return an error number as the function result. These error numbers have the same meanings as the error numbers returned in errno by other APIs.

errno(1), err(3), error(3), perror(3), strerror(3)

ares_set_socket_functions(3), blkio(3), efi_get_variable(3), errno(1), error(3), ERR_put_error.3ossl(3), form.3x(3), form_cursor.3x(3), form_driver.3x(3), form_field.3x(3), form_field_attributes.3x(3), form_field_buffer.3x(3), form_field_info.3x(3), form_field_just.3x(3), form_field_opts.3x(3), form_fieldtype.3x(3), form_field_validation.3x(3), form_hook.3x(3), form_opts.3x(3), form_page.3x(3), form_post.3x(3), form_win.3x(3), gawk(1), intro(2), intro(3), ldap_dup(3), ldap_get_dn(3), ldap_init(3), libnbd(3), libnbd-release-notes-1.2(1), libpsx(3), math_error(7), memcached_last_error(3), memcached_last_error_errno(3), memcached_last_error_message(3), menu.3x(3), menu_attributes.3x(3), menu_cursor.3x(3), menu_driver.3x(3), menu_format.3x(3), menu_hook.3x(3), menu_items.3x(3), menu_mark.3x(3), menu_new.3x(3), menu_opts.3x(3), menu_pattern.3x(3), menu_post.3x(3), menu_win.3x(3), mitem_current.3x(3), mitem_new.3x(3), mitem_opts.3x(3), mitem_value.3x(3), notcurses_input(3), perror(3), pmem2_config_new(3), pmem2_source_alignment(3), pmem2_source_device_id(3), pmem2_source_device_usc(3), pmem2_source_from_anon(3), pmem2_source_from_fd(3), pmem2_source_numa_node(3), pmem2_source_size(3), rc_service(3), sd_bus_error(3), sd_bus_error_add_map(3), sd-bus-errors(3), sd_bus_message_new_method_error(3), sd_journal_print(3), s-nail(1), strerror(3), _syscall(2), syscall(2), syscalls(2), systemd.exec(5), systemd.journal-fields(7), zip_error_init(3), zshparam(1), zzip_fopen(3), zzip_open(3), zzip_opendir(3), zzip_read(3), __zzip_try_open(3).

2022-12-04 Linux man-pages 6.04

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *