Messages in this thread |  | | Subject | Re: CLOSE_WAIT bug? | | From | Andi Kleen <> | | Date | 13 Jun 2001 10:55:47 +0200 |
| |
<eg_nth@sinocdn.com> writes:
> Hi all, > > I suppect that there is bug in both kernel 2.2.19 and 2.4.5. > The situation is as follow. > > One server socket created and listening, blocking on select(), > once a client connect to that port, there is another thread in server > side issues a close() to the new connection. > After the client close the connection. The connection in server side will > stuck on CLOSE_WAIT forever until the program being killed.
It is a known problem that unfortunately cannot be easily fixed with the current VFS. select has a reference to the file handle and it keeps it open until the select ends. Do a shutdown() in the thread before the close, then the select should wake up.
-Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |