Networking Forums

Networking Forums > Computer Networking > Linux Networking > Killing Sockets

Reply
Thread Tools Display Modes

Killing Sockets

 
 
Dan
Guest
Posts: n/a

 
      03-29-2005, 04:17 AM


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
 
Reply With Quote
 
 
 
 
prg
Guest
Posts: n/a

 
      03-29-2005, 06:10 AM

Dan wrote:
> 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.


Not being sure of the context or nature of your $ kill (or the Python
app) I'll just point you here:

http://groups-beta.google.com/group/...&q=kill+socket

hth,
prg

 
Reply With Quote
 
gg-csf@dmztest.vsr.ambisys.net
Guest
Posts: n/a

 
      03-29-2005, 06:21 AM
Hi,

You could try setting REUSEADDR on the socket within your application.
That should allow a second instance of the server to bind to the port
even while the old one is still hanging around.

GSF

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VPN & W2K3-R2 Killing me! DotCom SA Windows Networking 1 11-01-2006 04:14 AM
AD HOC killing network connectivity schoolboy Wireless Networks 0 02-10-2006 01:16 AM
Killing Zombie Processes ralfthewise Linux Networking 1 09-17-2005 02:55 PM
Killing a socket Frank Samuelson Linux Networking 3 01-28-2005 11:53 PM
This router is just killing me. Chris Lee Broadband Hardware 0 11-05-2004 11:14 PM



1 2 3 4 5 6 7 8 9 10 11