I have a multithreaded server written in C, with each client thread looking something like this:
ssize_t n; struct request request; // Main loop: receive re
Shutdown the socket for input from another thread. That will cause the reading thread to receive an EOS, which should cause it to close the socket and terminate if it is correctly written.