From 641191aa902bb3259a13d0f348b78a49aafe4902 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 17 Sep 2019 08:31:19 +0000 Subject: qspawn: log errors for generic PSGI server users Generic PSGI servers have $env->{'psgi.errors'}, too, so ensure they can log errors. --- lib/PublicInbox/Qspawn.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/PublicInbox/Qspawn.pm b/lib/PublicInbox/Qspawn.pm index 6b350f0f..844d50f7 100644 --- a/lib/PublicInbox/Qspawn.pm +++ b/lib/PublicInbox/Qspawn.pm @@ -116,10 +116,9 @@ sub waitpid_err ($$) { sub do_waitpid ($;$) { my ($self, $env) = @_; my $pid = $self->{pid}; - eval { # PublicInbox::DS may not be loaded - PublicInbox::DS::dwaitpid($pid, \&waitpid_err, $self); - $self->{env} = $env; - }; + $self->{env} = $env; + # PublicInbox::DS may not be loaded + eval { PublicInbox::DS::dwaitpid($pid, \&waitpid_err, $self) }; # done if we're running in PublicInbox::DS::EventLoop if ($@) { # non public-inbox-{httpd,nntpd} callers may block: -- cgit v1.2.3-24-ge0c7