I am writing a browser-based cgi app in Win32 with Apache. I have a udp socket server which handles requests. So I spin up an ithread with a shared $running flag to make sure I only have one copy running, and it works fine, for the most part, except it dies after some period of time. Does Apache have a limit for how long a thread can run? Is there a way to guarantee this runs forever?
Also, this project is something I have inherited, and there are several fork/exec pairs. Does this have the same effect in windows as it does in *nix? Is there anything I should be wary of?