When TCP sockets refuse to die
Then there is a discussion about forcefully killing sockets :)* close(): socket will be lingering in background as usual* shutdown(SHUT_RD): no network side effect, discards read buffer* shutdown(SHUT_WR): equivalent to FIN SO_LINGER socket - if timeout non-zero blocks until write buffer flushed; if timeout is zero then immediately sends RST* the trick with close() after TCP_REPAIR: (https://lwn.net/Articles/495304/) immediately discard a socket with no network side effects.* "ss --kill" command: forcefully close a socket from outside process, done with netlink SOCK_DESTROY command.