i am getting a segmentation fault after a client disconnects from a server, Think about what happens in the select command when a file descriptor in the read set corresponds to a client program that has died.
Then think about what read returns if you call it on a socket where the process on the read end of the socket has died? how to fix this 