Reusing a port after a crash

LukeD at pobox.com LukeD at pobox.com
Thu Apr 21 12:46:28 PDT 2005


>From time to time, my torrent filesharing application will crash or need 
to be killed.  The application is configured to listen on a specific port. 
If I try to restart the application after improper termination, I receive 
a fatal error message stating that the port is already in use.

Before restarting the application, I verify that the application did 
indeed shut down (via 'ps -aux') and 'sockstat -l' shows that no 
application is using the port in question, so I don't understand how the 
port could still be 'in use'.

The only way I've found to restart the application after improper 
termination is to reboot the whole system.  Is there something else I 
could try?  Does this kind of thing tend to happen to network applications 
when they crash or could this be specific to my application?

Luke Dean


More information about the freebsd-questions mailing list