[Catalyst] How receive signals from FCGI::ProcManager?

Jon Schutz jon+catalyst at youramigo.com
Fri Jan 14 22:16:50 GMT 2011



On 12/23/2010 06:28 AM, rimas rimas wrote:
>
> Hello!
>
> Some components of my application require accurate de-initialization
> to avoid resource leaks. I using Catalyst which running under
> FastCGI(ProcManager) and looking for possibility get notification that
> application is restarting or shutting down to perform specific cleanup
> actions.
> Seems to me ProcManager have required callbacks to notify application
> about events(e.g. pm_die) but is it possible to subscribe on such
> events without serious Catalyst hacking?
>
> Serg Gulko

Create your own App::FCGIManager with 'use base qw(FCGI::ProcManager)',
and run your process with 'app_fastcgi.pl -M App::FCGIManager'.  Then
you have access to override or adapt any of the FCGI::ProcManager
methods that you want to.

-- 

Jon Schutz
http://notes.jschutz.net



More information about the Catalyst mailing list