Skip to content

Instantly share code, notes, and snippets.

@typester
Created April 3, 2009 05:22
Show Gist options
  • Save typester/89640 to your computer and use it in GitHub Desktop.
Save typester/89640 to your computer and use it in GitHub Desktop.
package FCGI::ProcManager::Debug;
use strict;
use warnings;
use base qw/FCGI::ProcManager/;
sub pm_manage {
my $res = shift->SUPER::pm_manage(@_);
# manager does not return pm_manage, so below code should run in server only
$0 = 'perl-fcgi (waiting)';
$res;
}
sub pm_pre_dispatch {
$0 = sprintf('perl-fcgi (started %s)', scalar localtime);
shift->SUPER::pm_pre_dispatch(@_);
}
sub pm_post_dispatch {
$0 = 'perl-fcgi (waiting)';
shift->SUPER::pm_pre_dispatch(@_);
}
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment