public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug manual/1983] New: socket(s, 1) said to discard sent data
@ 2005-12-06 11:54 ceder at ingate dot com
  2007-10-16 16:48 ` [Bug manual/1983] " bpeeluk at yahoo dot co dot uk
  2007-10-16 16:53 ` bpeeluk at yahoo dot co dot uk
  0 siblings, 2 replies; 6+ messages in thread
From: ceder at ingate dot com @ 2005-12-06 11:54 UTC (permalink / raw)
  To: glibc-bugs

The Closing a Socket node says that shutdown works like this:

>    `1'
>          Stop trying to transmit data from this socket.  Discard any
>          data waiting to be sent.  Stop looking for acknowledgement of
>          data already sent; don't retransmit it if it is lost.

I have looked at shutdown(3n) in Solaris 10, and in the Single Unix
Specification, and they both say nothing about discarding data waiting
to be sent.  Does shutdown() really do that?  If it does, I think it
is a bug.  To the best of my understanding, the reason why you would
use shutdown(s,1) on a TCP socket is to send a FIN packet to the remote
side, but you typically still want all the data to arrive there.  (If any
data is discarded, I would naively assume that it would follow the policy
set up by SO_LINGER.)

My (rather unfounded) hypothesis is that the glibc manual is wrong in
this section.

(Page 11 of the document "An Introduction to OpenSSL Programming (Part I)",
which can be found at http://www.rtfm.com/openssl-examples/, shows why it
can be useful to force a FIN packet while still not wanting to discard
any sent data (the close_notify in this case).)

-- 
           Summary: socket(s, 1) said to discard sent data
           Product: glibc
           Version: 2.3.5
            Status: NEW
          Severity: normal
          Priority: P2
         Component: manual
        AssignedTo: roland at gnu dot org
        ReportedBy: ceder at ingate dot com
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=1983

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread
[parent not found: <bug-1983-131@http.sourceware.org/bugzilla/>]

end of thread, other threads:[~2014-06-30 18:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-06 11:54 [Bug manual/1983] New: socket(s, 1) said to discard sent data ceder at ingate dot com
2007-10-16 16:48 ` [Bug manual/1983] " bpeeluk at yahoo dot co dot uk
2007-10-16 16:53 ` bpeeluk at yahoo dot co dot uk
     [not found] <bug-1983-131@http.sourceware.org/bugzilla/>
2012-08-28 22:17 ` a.herefishyfishies at yahoo dot com
2013-10-21  6:48 ` neleai at seznam dot cz
2014-06-30 18:16 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).