I have a multi-process linux server application that receives a connection via accept() and forks to handle the requests on that new connection. I'm calling setsockopt(ClientSocket, SOL_SOCKET, SO_REUSEADDR....) on the new sockets, and from time to time, this will completely lock up my server and make it stop passing the connections off to the handler. the new connections are accepted, and the fork occurs, but the child process just stops on the setsockopt() line.
my question is: do I need to set that socket option on the new connection's socket, or just on the listening socket (which I also do)?