Should be a simple problem. I have a 'C' program that responds to POSTs. Program
does some stuff then prints a new screen. However, with Netscape Commerce
Server (AIX), the results screen does not finish loading until the handler program
terminates. I need to have the page display (and complete loading), while the
handler remains for a few minutes. I have tried flushing and closing stout, adding
extra CRLF and a bunch of other things but no success. Many browsers just paint
about 3/4 of the screen and still show loading until the handler finally dies.
I have also tried 'forking' a separate program to handle the section of code that
has to process AFTER the screen is shown, and although the parent terminates,
the screen still 'loads' until the CHILD process terminates. This action is different
from the NCSA server, which seems to provide a different communications path
between the browser and your program.
Any ideas? The real problem here is ensuring the person has seen the results page,
so if there is any other way (with Netscape Commerce Server) to determine the
user has not abandoned the request, that would suffice. (NCSA returns an error
on printf while outputing the page if the client has gone away, Netscape does not).
What I am doing now is having the original handler wait on a semaphore and the
result page includes an acknowledge button, which when submitted, clears the
semaphore and completes the original transaction. I know this messy, but can't
see any other way to do it.
(P.S) If there is a more appropriate group for this question, please let me know...