SO_LINGER + shutdown(2)
Poul-Henning Kamp
phk at phk.freebsd.dk
Fri May 1 10:27:09 UTC 2009
I was somewhat surprised to see that calling shutdown(SHUT_WR) on
a TCP socket with SO_LINGER set {.l_onoff = 1, .l_linger = 0} does
not in fact flush the send queue orderly, but immediately RST's the
connection.
I realize this is an issue for the Dept. of deep TCP arcanæ and not
something to be changed lightly, so consider this more of an
observation than bug report.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the freebsd-net
mailing list