Using apache on a windows server with mod_fastcgi, the C code looks like that:
void main() {
init();
while (FCGI_Accept() >= 0)
work();
cleanup();
}
When the service is taken down (i.e.: net stop apache2), the process terminates without getting to the cleanup code.
What am I missing here?