Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   unix    ( 7 )

сокеты для локального межпроцессного взаимодействия (sockets for local interprocess communication)

  Name  |  Synopsis  |  Description  |    Error    |  Versions  |  Note  |  Bugs  |  Examples  |  See also  |

Ошибки (Error)

EADDRINUSE
              The specified local address is already in use or the
              filesystem socket object already exists.

EBADF This error can occur for sendmsg(2) when sending a file descriptor as ancillary data over a UNIX domain socket (see the description of SCM_RIGHTS, above), and indicates that the file descriptor number that is being sent is not valid (e.g., it is not an open file descriptor).

ECONNREFUSED The remote address specified by connect(2) was not a listening socket. This error can also occur if the target pathname is not a socket.

ECONNRESET Remote socket was unexpectedly closed.

EFAULT User memory address was not valid.

EINVAL Invalid argument passed. A common cause is that the value AF_UNIX was not specified in the sun_type field of passed addresses, or the socket was in an invalid state for the applied operation.

EISCONN connect(2) called on an already connected socket or a target address was specified on a connected socket.

ENOENT The pathname in the remote address specified to connect(2) did not exist.

ENOMEM Out of memory.

ENOTCONN Socket operation needs a target address, but the socket is not connected.

EOPNOTSUPP Stream operation called on non-stream oriented socket or tried to use the out-of-band data option.

EPERM The sender passed invalid credentials in the struct ucred.

EPIPE Remote socket was closed on a stream socket. If enabled, a SIGPIPE is sent as well. This can be avoided by passing the MSG_NOSIGNAL flag to send(2) or sendmsg(2).

EPROTONOSUPPORT Passed protocol is not AF_UNIX.

EPROTOTYPE Remote socket does not match the local socket type (SOCK_DGRAM versus SOCK_STREAM).

ESOCKTNOSUPPORT Unknown socket type.

ESRCH While sending an ancillary message containing credentials (SCM_CREDENTIALS), the caller specified a PID that does not match any existing process.

ETOOMANYREFS This error can occur for sendmsg(2) when sending a file descriptor as ancillary data over a UNIX domain socket (see the description of SCM_RIGHTS, above). It occurs if the number of "in-flight" file descriptors exceeds the RLIMIT_NOFILE resource limit and the caller does not have the CAP_SYS_RESOURCE capability. An in-flight file descriptor is one that has been sent using sendmsg(2) but has not yet been accepted in the recipient process using recvmsg(2).

This error is diagnosed since mainline Linux 4.5 (and in some earlier kernel versions where the fix has been backported). In earlier kernel versions, it was possible to place an unlimited number of file descriptors in flight, by sending each file descriptor with sendmsg(2) and then closing the file descriptor so that it was not accounted against the RLIMIT_NOFILE resource limit.

Other errors can be generated by the generic socket layer or by the filesystem while generating a filesystem socket object. See the appropriate manual pages for more information.