tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Poskrobek" <robert.poskro...@tpg.pl>
Subject Problem with CGIServlet
Date Wed, 21 Nov 2001 11:19:04 GMT
Hi!
I've got Tomcat 4.0.1 for Windows and it's propertly configured to support
CGI programs.
Below a trivial c++ cgi program is shown. This program never ends, cause of
a stdout problem. I analyzed a lot of situations and I discoved that only
way to exit is to add '_exit(0);' function call at the end of program.
However '_exit' doesn't wait for any buffer flush or cleanup and response
data are not sent.



void main(char* argv[], int argc)
{
  printf("Content-type: text/html\n\n");

  for (int i=0; i<500; i++)
     printf("a");

  fflush(stdout);
}

Robert Poskrobek


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message