[Rt-commit] rt branch, 4.2/no-fastcgi-pm, created. rt-4.2.1-191-gfadb225
Alex Vandiver
alexmv at bestpractical.com
Fri Jan 10 19:48:16 EST 2014
The branch, 4.2/no-fastcgi-pm has been created
at fadb2255f2e4ed10f2bf06a3da8535060affb6dd (commit)
- Log -----------------------------------------------------------------
commit fadb2255f2e4ed10f2bf06a3da8535060affb6dd
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Fri Jan 10 19:36:29 2014 -0500
Don't start a FCGI process manager unless one is needed
Plack::Handler::FCGI checks for a true "listen" value to determine if a
FastCGI process manager is necessary -- this is usually only needed in
the case where the plack process is being run as an "external" fastcgi
process, which will fork multiple subprocceses and communicate with the
webserver via a fixed endpoint (local port or socket on disk). It is
unnecessary when the process is started by the webserver, and the
communication is via STDIN. While unnecessary, it does work, however.
The refactoring in 6c15e8a3 removed the following line and comment:
### mangle_host_port_socket ruins everything
delete $r->{options} if $is_fastcgi;
It was replaced with an override of mangle_host_port_socket. In doing
so, "listen" for the case of reading from STDIN was set to an empty
list, rather than to a false value. This caused the aforementioned
FastCGI process manager logic to kick in.
Restore the previous behavior, and drop the unnecessary FastCGI process
manager, by ensuring that "listen" is not set if no listen sockets have
been provided. This also has the useful side-effect of restoring the
process name (as seen via `ps`) to be the path to rt-server.fcgi, and
not the static string "perl-fcgi-pm" with a "perl-fcgi" subprocess.
diff --git a/lib/RT/PlackRunner.pm b/lib/RT/PlackRunner.pm
index 5f5975f..45c5161 100644
--- a/lib/RT/PlackRunner.pm
+++ b/lib/RT/PlackRunner.pm
@@ -96,7 +96,9 @@ sub mangle_host_port_socket {
my ($host, $port, $socket, @listen) = @_;
return $self->SUPER::mangle_host_port_socket(@_)
if @listen or $port or $socket;
- return host => $host, port => $port, socket => $socket, listen => \@listen;
+
+ return host => $host, port => $port, socket => $socket,
+ @listen ? (listen => \@listen) : ();
}
sub app {
-----------------------------------------------------------------------
More information about the rt-commit
mailing list