[lkml]   [1997]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: Problem with Linux sockets not closing
Well, I'll reserve judgement on whether SO_LINGER is working correctly
or not until after I install the patch. Just one question. Where can I
get a copy of pre-2.0.31?


>-----Original Message-----
>From: []
>Sent: Thursday, May 08, 1997 2:24 PM
>To: Jim Torelli
>Subject: Re: Problem with Linux sockets not closing
>Jim Torelli <> writes:
>> The CloseSocket function sets SO_LINGER to abort the connection,
>>calls shutdown(), then close(). I really don't think I'm doing anything
>>wrong here.
>There was a bug in earlier 2.0.x kernels that cause a shutdown() followed
>by a close() to kill a socket immediately without finishing the
>proper sequence of TCP shutdown events. I fixed this in 2.0.30, but
>I had some brain slippage when writing the fix and missed a small case.
>The result is that if you do a shutdown() then a close() in 2.0.30
>you will get an extra FIN packet with a new sequence number, and
>the observed problem with getting stuck in close(). I posted a patch
>for this a couple of days ago which is present in the current pre-2.0.31
>test patches. Please try the test patch and let me know if the problem
>goes away.
>As an aside a possible work around for the problem is to avoid doing
>the shutdown() close() sequence, since the close() effectly does a
>shutdown() anyway. Still, this should not be necessary and we should
>fix the bug in the kernel.
>BTW, I've had a vauge report that SO_LINGER does not work. Can you
>tell me if it appears to be working correctly for you in the pre-2.0.31
>Eric Schenk www:
>Dept. of Comp. Sci., Lund University email:
>Box 118, S-221 00 LUND, Sweden fax: +46-46 13 10 21 ph: +46-46 222 96 38

 \ /
  Last update: 2005-03-22 13:39    [W:0.042 / U:4.440 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site