I have a socket that listens on some port. I send the SIGSTOP signal to the thread that waits on the port (using accept) and terminate it. then I close the fd of the socket
See: Using SO_REUSEADDR - What happens to previously open socket?