Patchwork socket.7: Correctly describe SO_SNDTIMEO for connect

login
register
mail settings
Submitter Andi Kleen
Date Nov. 8, 2012, 3:55 p.m.
Message ID <1352390123-28658-1-git-send-email-andi@firstfloor.org>
Download mbox | patch
Permalink /patch/197853/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Andi Kleen - Nov. 8, 2012, 3:55 p.m.
From: Andi Kleen <ak@linux.intel.com>

When SO_SNDTIMEO is set before connect() connect may return EWOULDBLOCK
when the timeout fires. Describe this correctly.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 man7/socket.7 |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
Michael Kerrisk - Nov. 9, 2012, 6 a.m.
Hi Andi,

On Thu, Nov 8, 2012 at 4:55 PM, Andi Kleen <andi@firstfloor.org> wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> When SO_SNDTIMEO is set before connect() connect may return EWOULDBLOCK
> when the timeout fires. Describe this correctly.

Thanks.

Applied.

Cheers,

Michael


> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
>  man7/socket.7 |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/man7/socket.7 b/man7/socket.7
> index cd75746..9e05f48 100644
> --- a/man7/socket.7
> +++ b/man7/socket.7
> @@ -434,6 +434,9 @@ set to
>  .B EAGAIN
>  or
>  .B EWOULDBLOCK
> +or
> +.B EINPROGRESS
> +(for connect)
>  .\" in fact to EAGAIN
>  just as if the socket was specified to be nonblocking.
>  If the timeout is set to zero (the default)
> @@ -442,6 +445,7 @@ Timeouts only have effect for system calls that perform socket I/O (e.g.,
>  .BR read (2),
>  .BR recvmsg (2),
>  .BR send (2),
> +.BR connect (2),
>  .BR sendmsg (2));
>  timeouts have no effect for
>  .BR select (2),
> --
> 1.7.7.6
>

Patch

diff --git a/man7/socket.7 b/man7/socket.7
index cd75746..9e05f48 100644
--- a/man7/socket.7
+++ b/man7/socket.7
@@ -434,6 +434,9 @@  set to
 .B EAGAIN
 or
 .B EWOULDBLOCK
+or
+.B EINPROGRESS
+(for connect)
 .\" in fact to EAGAIN
 just as if the socket was specified to be nonblocking.
 If the timeout is set to zero (the default)
@@ -442,6 +445,7 @@  Timeouts only have effect for system calls that perform socket I/O (e.g.,
 .BR read (2),
 .BR recvmsg (2),
 .BR send (2),
+.BR connect (2),
 .BR sendmsg (2));
 timeouts have no effect for
 .BR select (2),