This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug manual/11489] New: Documentation for the shutdown function is misleading
- From: "bpeeluk at yahoo dot co dot uk" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 12 Apr 2010 17:37:01 -0000
- Subject: [Bug manual/11489] New: Documentation for the shutdown function is misleading
- Reply-to: sourceware-bugzilla at sourceware dot org
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.