- Updated benchmarking to work with detach
- Fixed dispatcher, so $c->req->action(undef) works again
- Updated Catalyst::Test to use HTTP::Request::AsCGI
+ - Added -pidfile to external FastCGI server.
5.55 2005-11-15 12:55:00
- Fixed multiple cookie handling
interrupted by Ctrl+C
nproc Specify a number of processes for
FCGI::ProcManager
+ pidfile Specify a filename for the pid file
=cut
);
my $proc_manager;
-
- if ( $listen and ( $options->{nproc} || 1 ) > 1 ) {
+
+ if ( $listen ) {
require FCGI::ProcManager;
- $proc_manager =
- FCGI::ProcManager->new( { n_processes => $options->{nproc} } );
+ $options->{nproc} ||= 1;
+
+ $proc_manager
+ = FCGI::ProcManager->new( { n_processes => $options->{nproc} } );
+
+ if ( $options->{pidfile} ) {
+ $proc_manager->pm_write_pid_file( $options->{pidfile} );
+ }
+
$proc_manager->pm_manage();
}
use [% name %];
my $help = 0;
-my ( $listen, $nproc );
+my ( $listen, $nproc, $pidfile );
GetOptions(
- 'help|?' => \$help,
- 'listen|l=s' => \$listen,
- 'nproc|n=i' => \$nproc,
+ 'help|?' => \$help,
+ 'listen|l=s' => \$listen,
+ 'nproc|n=i' => \$nproc,
+ 'pidfile|p=s' => \$pidfile,
);
pod2usage(1) if $help;
-[% name %]->run( $listen, { nproc => $nproc } );
+[% name %]->run(
+ $listen,
+ { nproc => $nproc,
+ pidfile => $pidfile,
+ }
+);
1;