public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug manual/11489] New: Documentation for the shutdown function is misleading
@ 2010-04-12 17:37 bpeeluk at yahoo dot co dot uk
  0 siblings, 0 replies; only message in thread
From: bpeeluk at yahoo dot co dot uk @ 2010-04-12 17:37 UTC (permalink / raw)
  To: glibc-bugs

The documentation for the shutdown function with SHUT_WR says:

          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.

This implies that shutdown effectively aborts the connection and loses data 
which is very misleading. I'm pretty sure that for TCP shutdown will still cause 
the queued data to be written. It will then just set the FIN flag on the final 
packet. There is much alternative documentation which implies this behaviour, 
such as UNIX Network Programming by Richard Stevens:

"SHUT_WR. The write half of the connection is closed.— In the case of TCP, this 
is called a half-close (Section 18.5 of TCPv1). Any data currently in the socket 
send buffer will be sent, followed by TCP's normal connection termination 
sequence."

-- 
           Summary: Documentation for the shutdown function is misleading
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: manual
        AssignedTo: roland at gnu dot org
        ReportedBy: bpeeluk at yahoo dot co dot uk
                CC: glibc-bugs at sources dot redhat dot com


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

------- 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] only message in thread

only message in thread, other threads:[~2010-04-12 17:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-12 17:37 [Bug manual/11489] New: Documentation for the shutdown function is misleading bpeeluk at yahoo dot co dot uk

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).