When SO_SNDTIMEO is set before connect(), then connect()
may return EWOULDBLOCK when the timeout fires.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
and the timeout has been reached then \-1 is returned with
.I errno
set to
-.B EAGAIN
+.BR EAGAIN
or
-.B EWOULDBLOCK
+.BR EWOULDBLOCK ,
.\" in fact to EAGAIN
+or
+.B EINPROGRESS
+(for
+.BR connect (2))
just as if the socket was specified to be nonblocking.
If the timeout is set to zero (the default)
then the operation will never timeout.
.\" This man page was written by Andi Kleen.
.SH "SEE ALSO"
.BR getsockopt (2),
+.BR connect (2),
.BR setsockopt (2),
.BR socket (2),
.BR capabilities (7),