aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2018-08-22 21:13:39 -0700
committerMichael Kerrisk <mtk.manpages@gmail.com>2018-08-26 13:35:06 +0200
commit1466257758da3604cd2801219c9026994c9d494e (patch)
tree6faa5213b32042702ad6981299d77d8dd124e0aa
parentfa38cc321f1b3a2357801072c08eb0070276d0d0 (diff)
downloadman-pages-1466257758da3604cd2801219c9026994c9d494e.tar.gz
connect.2: Document error semantics of nonblocking UNIX domain sockets
connect(2) on a nonblocking UNIX domain socket when the receive queue is full results in EAGAIN [1]. This is unlike other connection-based socket families that return EINPROGRESS as already documented. mtk: confirmed with some light testing. And in net/unix/af_unix.c::unix_stream_connect(), we have: if (unix_recvq_full(other)) { err = -EAGAIN; if (!timeo) goto out_unlock; Signed-off-by: Benjamin Peterson <benjamin@python.org> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man2/connect.28
1 files changed, 6 insertions, 2 deletions
diff --git a/man2/connect.2 b/man2/connect.2
index 5941cf2d3f..313f73adde 100644
--- a/man2/connect.2
+++ b/man2/connect.2
@@ -168,7 +168,9 @@ The passed address didn't have the correct address family in its
field.
.TP
.B EAGAIN
-Insufficient entries in the routing cache.
+For nonblocking UNIX domain sockets, the socket is nonblocking, and the
+connection cannot be completed immediately. For other socket families, there are
+insufficient entries in the routing cache.
.TP
.B EALREADY
The socket is nonblocking and a previous connection attempt has not yet
@@ -188,7 +190,9 @@ The socket structure address is outside the user's address space.
.TP
.B EINPROGRESS
The socket is nonblocking and the connection cannot be completed
-immediately.
+immediately. (UNIX domain sockets return
+.BR EAGAIN
+instead.)
It is possible to
.BR select (2)
or