3 ms·
In case you're interested in only closing the TCP socket, and not killing the process, I wrote a linux-only PoC: https://github.com/anisse/tcpkill/ https://gith
by Aissen 4y ago
In case you're interested in only closing the TCP socket, and not killing the process, I wrote a linux-only PoC: https://github.com/anisse/tcpkill/ https://github.com/anisse/tcpkill/
It has two implemented methods: one uses pidfd, the other uses netlink INET_DIAG_DESTROY (like ss -K).
CLI UX could be improved, but it does the job.