Created
April 3, 2009 05:22
-
-
Save typester/89640 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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