Force socket closed

Dennis devel at
Fri Mar 17 11:40:04 MST 2006

Nicholas Leippe wrote:
> On Friday 17 March 2006 11:19, Kenneth Burgener wrote:
>> Is there a way to force a socket to be closed?  I had an application
>> that was forcefully closed.  I believe the kernel will eventually close
>> it, but I would prefer not to have the several minute wait.  Any
>> suggestions?
When I've programmed servers in the past, I added a socket option to the
port on startup that would allow it to bind to a port that hadn't been
fully timed out yet.  Then if I killed it I could restart the server ok.

man 7 socket and read about:

> I don't know about an individual socket, but you could play with the
> value in
> /proc/sys/net/ipv4/tcp_fin_timeout

More information about the PLUG mailing list