mirror of https://github.com/mkerrisk/man-pages
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:
parent
cc2b44ebed
commit
b18ea63300
13
man2/bind.2
13
man2/bind.2
|
@ -183,6 +183,12 @@ The socket is already bound to an address.
|
||||||
.\" This may change in the future: see
|
.\" This may change in the future: see
|
||||||
.\" .I linux/unix/sock.c for details.
|
.\" .I linux/unix/sock.c for details.
|
||||||
.TP
|
.TP
|
||||||
|
.B EINVAL
|
||||||
|
.I addrlen
|
||||||
|
is wrong, or
|
||||||
|
.I addr
|
||||||
|
is not a valid address for this socket's domain.
|
||||||
|
.TP
|
||||||
.B ENOTSOCK
|
.B ENOTSOCK
|
||||||
.I sockfd
|
.I sockfd
|
||||||
is a descriptor for a file, not a socket.
|
is a descriptor for a file, not a socket.
|
||||||
|
@ -204,13 +210,6 @@ address was not local.
|
||||||
.I addr
|
.I addr
|
||||||
points outside the user's accessible address space.
|
points outside the user's accessible address space.
|
||||||
.TP
|
.TP
|
||||||
.B EINVAL
|
|
||||||
The
|
|
||||||
.I addrlen
|
|
||||||
is wrong, or the socket was not in the
|
|
||||||
.B AF_UNIX
|
|
||||||
family.
|
|
||||||
.TP
|
|
||||||
.B ELOOP
|
.B ELOOP
|
||||||
Too many symbolic links were encountered in resolving
|
Too many symbolic links were encountered in resolving
|
||||||
.IR addr .
|
.IR addr .
|
||||||
|
|
Loading…
Reference in New Issue