All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* Addition to connect(2)
@ 2014-08-18 16:58 Michael Haardt
       [not found] ` <E1XJQGp-0000UO-0v-lBFDS8/7i9huFsqOOl7tcLNAH6kLmebB@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Haardt @ 2014-08-18 16:58 UTC (permalink / raw
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 265 bytes --]

Hello,

the manual page does not describe the state of a socket after a
failed connect call.  Surprisingly, there are TCP/IP stacks where
it is unusable (met one today).  Opengroup also specifies that
as allowed behaviour, so the manual should mention it.

Michael

[-- Attachment #2: connect.2.diff --]
[-- Type: text/plain, Size: 966 bytes --]

--- /usr/share/man/man2/connect.2	2014-08-18 18:48:29.894304874 +0200
+++ ./connect.2	2014-08-18 18:53:24.945090422 +0200
@@ -63,8 +63,9 @@
 .\" Modified 1997-01-31 by Eric S. Raymond <esr-4uCgticg2UFBDgjK7y7TUQ@public.gmane.org>
 .\" Modified 1998, 1999 by Andi Kleen
 .\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+.\" Modified 2014-08-18 by Michael Haardt <michael-8s1n8bisGiQ@public.gmane.org>
 .\"
-.TH CONNECT 2 2014-07-08 "Linux" "Linux Programmer's Manual"
+.TH CONNECT 2 2014-08-14 "Linux" "Linux Programmer's Manual"
 .SH NAME
 connect \- initiate a connection on a socket
 .SH SYNOPSIS
@@ -267,6 +268,12 @@
 also used by glibc.
 See also
 .BR accept (2).
+
+Although it works in Linux, if
+.B connect()
+fails, consider the state of the socket as unspecified.  Portable
+applications should close the socket and create a new one for
+reconnecting.
 .SH EXAMPLE
 An example of the use of
 .BR connect ()

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Addition to connect(2)
       [not found] ` <E1XJQGp-0000UO-0v-lBFDS8/7i9huFsqOOl7tcLNAH6kLmebB@public.gmane.org>
@ 2014-08-21 22:09   ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2014-08-21 22:09 UTC (permalink / raw
  To: Michael Haardt
  Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
	linux-man-u79uwXL29TY76Z2rM5mHXA

On 08/18/2014 11:58 AM, Michael Haardt wrote:
> Hello,
> 
> the manual page does not describe the state of a socket after a
> failed connect call.  Surprisingly, there are TCP/IP stacks where
> it is unusable (met one today).  Opengroup also specifies that
> as allowed behaviour, so the manual should mention it.

Hello Michael

Thanks for the patch. I applied it, but dropped the piece 
"Although it works in Linux".

Cheers,

Michael


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-21 22:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-18 16:58 Addition to connect(2) Michael Haardt
     [not found] ` <E1XJQGp-0000UO-0v-lBFDS8/7i9huFsqOOl7tcLNAH6kLmebB@public.gmane.org>
2014-08-21 22:09   ` Michael Kerrisk (man-pages)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.