BTW, I must have missed something, but why you dont just keep using the same Socket after fork?
Mirek
Because fork was just an example of one of the methods. I use exec(), which starts a whole new process. I catch the HUP signal which reloads the binary, basically giving the ability to update my program without losing any connections. It does this by saving every class variable that is necessary in a sessions file(xml) and then loading it back in the new binary. Which then resumes the socket connections.