Maybe you can write some codes in your process:
receive a signal, then close your socket fd.
So, when you send a signal to your process, the socket can be killed.
> I need to kill a socket without killing the process that
> created it. Can I do this?
>
> Here's the connection from netstat on the computer 'wolf':
> tcp 0 0 wolf:57892 pup230:26754 ESTABLISHED
>
> I know the connection is gone (pup230 is down).
> If I can get Linux to realize this socket should be dead,
> my process will properly handle the exception and continue on.
>
> Thanks for any help.
>
> -Frank
>
|