On Fri, May 6, 2011 at 3:24 PM, James Carlson <carls...@workingcode.com> wrote: > Kacheong Poon wrote: >> On 05/ 7/11 12:35 AM, Nico Williams wrote: >> >>> What would the alternative be? That the socket lingers forever? >> >> >> The current Solaris behavior is that the TCP connection >> continues to do a graceful shutdown. It is like a normal >> close() without setting the linger option. I want to know >> if it is something we can change without breaking backward >> compatibility. If the current behavior is actually the >> wrong behavior, it is just a bug we fix. > > I'd be surprised to see TCP RST when l_linger is > 0. That's not how > BSD operates.
I'd looked at one of the Stevens books, specifically the implementation of soclose(), but it seems I misread it. Re-reading the documentation posted here, I agree, the socket must continue to shutdown gracefully. (An application might then reset the linger option so that the socket is reset... it might be nice to have a simple API by which to request "linger upto N seconds, then give up and reset the connection".) Nico -- _______________________________________________ networking-discuss mailing list networking-discuss@opensolaris.org