bind.2: Correct EINVAL error description

As pointed out by Ryan:

    My application is trying to bind an IPV4 UDP socket to an
    address. I've found that passing an invalid address length
    to bind() causes bind to return EINVAL. According to the
    bind(2) manpage, this should only occur when using unix
    domain sockets (which I am not).

Reported-by: Ryan Hammonds <rhammonds@unicoi.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-07-22 07:40:22 +02:00
parent cc2b44ebed
commit b18ea63300
1 changed files with 6 additions and 7 deletions

View File

@ -183,6 +183,12 @@ The socket is already bound to an address.
.\" This may change in the future: see
.\" .I linux/unix/sock.c for details.
.TP
.B EINVAL
.I addrlen
is wrong, or
.I addr
is not a valid address for this socket's domain.
.TP
.B ENOTSOCK
.I sockfd
is a descriptor for a file, not a socket.
@ -204,13 +210,6 @@ address was not local.
.I addr
points outside the user's accessible address space.
.TP
.B EINVAL
The
.I addrlen
is wrong, or the socket was not in the
.B AF_UNIX
family.
.TP
.B ELOOP
Too many symbolic links were encountered in resolving
.IR addr .