Re: mod_fcgi/perl: Problem with signals

Sven Verdoolaege <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <20050615140357.GL12763MdfPADPa@garage.linux.student.kuleuven.ac.be>
On Wed, May 04, 2005 at 10:45:28AM +0200, Albert Leidinger wrote:
> Hi!
> 
> I want to use shared memory with FastCGI (dynamic processes). So I try 
> to handle the TERM Signal to free the memory when the creating process 
> is stopped.

Why don't you just free the memory after the while loop ?

> $SIG{TERM} = sub { open( LOG, '>>fcgi.log' ); print LOG "stop\n"; close( 
> LOG); exit; };
> 
> while( my $q = new CGI::Fast )
> {
> 
>        open( LOG, '>>fcgi.log' );
> 
>        print LOG "do request\n";
>       
>        close( LOG );
> 
>        print "Content-Type: text/html\n\nTest";
>   
> }


skimo

___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.