How to clean up a CLOSE_WAIT socket

From: Pedro Jose Serrahima Bartolome <serrahim_at_lulu.iic.uam.es>
Date: Tue, 04 Feb 1997 15:55:16 -0600

Hi all,

I'm programming a client/server application that sometimes crash
abnormally, leaving one socket in CLOSE_WAIT state, as indicated
by netstat command.

My problem is not why the application crashed, but the fact that
I don't know how to clean up this socket, and then, I cannot restart
the program because the bind C function fails due to the error :
 'address alrady in use' caused by the presence of this CLOSE_WAIT
state socket.

Up to this moment, the only way I've found to solve this is restarting
the computer, but, of course, this is not a good solution.

the O.S is Dunix 4.0 and 3.2.

Thanks in advance for any help.

Pedro Serrahima
IIC Madrid
Spain
Received on Tue Feb 04 1997 - 16:32:17 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:47 NZDT