How to close the network connection when process has already dead 

Newsgroups: comp.unix.programmer,comp.unix.questions
>Has anyone ever seen a network connection being status "FIN_WAIT_"(using
>netstat) for more than ten hours even if the process has been killed? Is
>there a way to close such connection without reboot the machine?

This means that the local process closed the connection, but we're still waiting for the remote system to close it. If it's FIN_WAIT_1 then it means we never even received an ACK for the FIN packet; this shouldn't last long, since we should eventually time out waiting for the ACK. But if it's FIN_WAIT_2 it means that we received an ACK, and we're just waiting for the remote process to close the connection. If the remote process is hung, or the remote machine has crashed, the connection will stay like this forever.

I don't know of any way to get rid of connections in FIN_WAIT_2 state. If you have lots of them then there's probably a bug in the implementation of the software at the other end.

Barry Margolin