[Rt-commit] rt branch 5.0/fcgi-use-server-starter-socket created. rt-5.0.4-32-g29e2b579a9

BPS Git Server git at git.bestpractical.com
Wed Jun 28 21:14:23 UTC 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/fcgi-use-server-starter-socket has been created
        at  29e2b579a97d658d866f68fdf4a6e4102abc023a (commit)

- Log -----------------------------------------------------------------
commit 29e2b579a97d658d866f68fdf4a6e4102abc023a
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Jun 29 04:53:11 2023 +0800

    No need to check listen address if FCGI is managed by Server::Starter
    
    Plack::Handler::FCGI automatically uses the corresponding argument set
    by Server::Starter, so there is no need to require it explicitly.
    
    With it, we won't need to duplicate arguments like:
    
        start_server --path var/rt.sock -- sbin/rt-server.fcgi --listen var/rt.sock
    
    We can simply run:
    
        start_server --path var/rt.sock -- sbin/rt-server.fcgi

diff --git a/lib/RT/PlackRunner.pm b/lib/RT/PlackRunner.pm
index 220cdb25e2..eea09240ff 100644
--- a/lib/RT/PlackRunner.pm
+++ b/lib/RT/PlackRunner.pm
@@ -135,7 +135,7 @@ sub run {
     # Plack::Handler::FCGI has its own catch for this, but doesn't
     # notice that listen is an empty list, and we can also provide a
     # better error message.
-    if ($self->{server} eq "FCGI" and not -S STDIN and not @{$args{listen} || []}) {
+    if (!$ENV{SERVER_STARTER_PORT} and $self->{server} eq "FCGI" and not -S STDIN and not @{$args{listen} || []}) {
         print STDERR "STDIN is not a socket, and no --listen, --socket, or --port provided\n";
         exit 1;
     }

-----------------------------------------------------------------------


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list