CGI End Output

I'm using C to make CGI applications that are being run by Lighttpd's CGI module.

I need my CGI application to output a page and then to do some processing that will kill the webservers connection to the client (changing the IP address) so I need my app to signal to the CGI module that it has finished sending the webpage so that the browser isn't waiting indefinitely for my program to exit.

Is there a way for my program to terminate it's connection to the CGI module, or to tell the CGI module that I'm done outputing data, so that the webpage can be displayed while my program continues it's processing?

I tried simply doing fclose(stdout), and this seems to work intermittently, about half the time my program terminates instead.
Have you asked on the lighttpd's support forum?
Topic archived. No new replies allowed.