about summary refs log tree commit homepage
path: root/lib/PublicInbox/Qspawn.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-01-02 08:20:13 +0000
committerEric Wong <e@80x24.org>2023-01-02 09:02:51 +0000
commit9ee49419e5138798613d51611c79df5b43e29fa2 (patch)
tree66c42b7554e7f8b697f5f353b0035a1594e0b064 /lib/PublicInbox/Qspawn.pm
parentc88a8c39c987c16e71ae69536ba40d7a30dabd7f (diff)
downloadpublic-inbox-9ee49419e5138798613d51611c79df5b43e29fa2.tar.gz
This fixes the inability to fallback to WwwCoderepo on cgit 404s
with generic PSGI servers.  Unfortunately, this doesn't seem to
get tested with generic PSGI tests, and doesn't happen on
public-inbox-httpd, obviously.
Diffstat (limited to 'lib/PublicInbox/Qspawn.pm')
-rw-r--r--lib/PublicInbox/Qspawn.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/PublicInbox/Qspawn.pm b/lib/PublicInbox/Qspawn.pm
index 9ca6b3db..297a284f 100644
--- a/lib/PublicInbox/Qspawn.pm
+++ b/lib/PublicInbox/Qspawn.pm
@@ -233,9 +233,10 @@ sub psgi_return_init_cb {
         if (ref($r) ne 'ARRAY' || scalar(@$r) == 3) { # error
                 if ($async) { # calls rpipe->close && ->event_step
                         $async->close; # PublicInbox::HTTPD::Async::close
-                } else {
-                        $self->{rpipe}->close;
+                } else { # generic PSGI:
+                        delete($self->{rpipe})->close;
                         event_step($self);
+                        waitpid_err($self);
                 }
                 if (ref($r) eq 'ARRAY') { # error
                         $wcb->($r)