[Catalyst-commits] r13686 - in Catalyst-Runtime/5.80/trunk:
lib/Catalyst/Engine lib/Catalyst/Script t/aggregate
zerodogg at dev.catalyst.perl.org
zerodogg at dev.catalyst.perl.org
Wed Nov 3 15:09:37 GMT 2010
Author: zerodogg
Date: 2010-11-03 15:09:37 +0000 (Wed, 03 Nov 2010)
New Revision: 13686
Modified:
Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/FastCGI.pm
Catalyst-Runtime/5.80/trunk/lib/Catalyst/Script/FastCGI.pm
Catalyst-Runtime/5.80/trunk/t/aggregate/unit_core_script_fastcgi.t
Log:
Added a --title parameter to fastcgi script, sets process title for FCGI::ProcManager
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/FastCGI.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/FastCGI.pm 2010-11-03 11:17:38 UTC (rev 13685)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/FastCGI.pm 2010-11-03 15:09:37 UTC (rev 13686)
@@ -113,6 +113,7 @@
if ($listen) {
$options->{manager} ||= "FCGI::ProcManager";
$options->{nproc} ||= 1;
+ $options->{title} ||= "perl-fcgi-pm [$class]";
$self->daemon_fork() if $options->{detach};
@@ -123,6 +124,7 @@
{
n_processes => $options->{nproc},
pid_fname => $options->{pidfile},
+ pm_title => $options->{title},
}
);
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Script/FastCGI.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Script/FastCGI.pm 2010-11-03 11:17:38 UTC (rev 13685)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Script/FastCGI.pm 2010-11-03 15:09:37 UTC (rev 13686)
@@ -55,6 +55,14 @@
documentation => 'Specify a number of child processes',
);
+has title => (
+ traits => [qw(Getopt)],
+ cmd_aliases => 't',
+ isa => Str,
+ is => 'ro',
+ documentation => 'Set the process title',
+);
+
sub _application_args {
my ($self) = shift;
return (
@@ -65,6 +73,7 @@
manager => $self->manager,
detach => $self->daemon,
keep_stderr => $self->keeperr,
+ title => $self->title,
}
);
}
@@ -96,6 +105,7 @@
or empty string to disable
-e --keeperr send error messages to STDOUT, not
to the webserver
+ -t --title set the process title
=head1 DESCRIPTION
Modified: Catalyst-Runtime/5.80/trunk/t/aggregate/unit_core_script_fastcgi.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/aggregate/unit_core_script_fastcgi.t 2010-11-03 11:17:38 UTC (rev 13685)
+++ Catalyst-Runtime/5.80/trunk/t/aggregate/unit_core_script_fastcgi.t 2010-11-03 15:09:37 UTC (rev 13686)
@@ -39,6 +39,10 @@
testOption( [ qw/--nproc 6/ ], [undef, opthash(nproc => 6)] );
testOption( [ qw/--n 6/ ], [undef, opthash(nproc => 6)] );
+# title
+testOption( [ qw/--title foo/ ], [undef, opthash(title => 'foo')] );
+testOption( [ qw/-t foo/ ], [undef, opthash(title => 'foo')] );
+
done_testing;
sub testOption {
@@ -62,6 +66,7 @@
detach => undef,
nproc => undef,
manager => undef,
+ title => undef,
@_,
};
}
More information about the Catalyst-commits
mailing list