Killing Sockets

From: Dan (dan_at_dontspammecauseidontlikit.com)
Date: 03/29/05


Date: Tue, 29 Mar 2005 12:17:00 +0800


I'm working on a Python app that creates a tcp socket and listens on a
port. Sometimes I've found that after I've killed the process, the
socket still remains. When I did a netstat -t, I saw that the socket
is still in the fin-wait-1 state. When I did a ps -ef, I couldn't see
any process still alive that the socket was attached to.

Is there some way to kill the socket is this instance? Being in
fin-wait, it eventually kills itself, but I couldn't restart the
Python app until it had done so.

Dan



Relevant Pages

  • Re: Killing Sockets
    ... > port. ... > socket still remains. ... > Python app until it had done so. ... Not being sure of the context or nature of your $ kill (or the Python ...
    (comp.os.linux.networking)
  • Re: How do you kill a completly locked up thread?
    ... a Connect call will totally lock up the thread and ... I am sure it has something to do with weirdness going on ... Is there some other way to kill off a thread? ... Do you have access to the socket handle for the connection? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: I need a tip for socket disconnection issue.
    ... 'Kill the socket. ... 'Kill any data being sent or received. ... I have a server that handle many client connection. ... In the case that the server try to send a message to a client. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: I need a tip for socket disconnection issue.
    ... 'Kill the socket. ... 'Kill any data being sent or received. ... I have a server that handle many client connection. ... In the case that the server try to send a message to a client. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: [NETLINK] Dont attach callback to a going-away netlink socket
    ... David Miller wrote: ... but this fix is good for now. ... socket are gone, we don't need to kill the CB until that happens. ...
    (Linux-Kernel)