Re: fastCGI, memory leaks etc
Rujith S. de Silva (desilva@ind70.industry.net)
Thu, 22 Aug 1996 11:44:13 -0400
Message-Id: <321C804D.167EB0E7@ind70.industry.net>
Date: Thu, 22 Aug 1996 11:44:13 -0400
From: "Rujith S. de Silva" <desilva@ind70.industry.net>
To: Michael Smith <mjs@cursci.co.uk>
Subject: Re: fastCGI, memory leaks etc
Michael Smith wrote:
> my($count)=0;
>
> while (FCGI::accept() >= 0) {
> $count++;
> print "Content-type: text/html\n\nCount=$count\n";
> if ($count > 3) {
> exit(0);
> }
> }
>
> But this gives me a server error every forth time. Any way of avoiding
> this undesirable effect would be much appreciated.
Use FCGI::finish () before exit(). finish() tells the server that you have
finished processing the current request, but are not ready to accept another
request.
Later,
Rujith.