* [PATCH 2/6] qspawn: log errors for generic PSGI server users
2019-09-17 8:31 5% [PATCH 0/6] qspawn-related cleanups, comments, and minor fix Eric Wong
@ 2019-09-17 8:31 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2019-09-17 8:31 UTC (permalink / raw)
To: meta
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 6b350f0..844d50f 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:
--
EW
^ permalink raw reply related [relevance 7%]
* [PATCH 0/6] qspawn-related cleanups, comments, and minor fix
@ 2019-09-17 8:31 5% Eric Wong
2019-09-17 8:31 7% ` [PATCH 2/6] qspawn: log errors for generic PSGI server users Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2019-09-17 8:31 UTC (permalink / raw)
To: meta
Still haven't found anything which is causing problems on korg,
but found a bunch of worthwhile cleanups, clarifications
and perhaps minor efficiency improvements that I'm comfortable
putting on 'master'.
Eric Wong (6):
qspawn: remove return value from ->finish
qspawn: log errors for generic PSGI server users
qspawn: shorten lifetime of circular references
qspawn: improve variable naming and commenting
http: drop unused `$env' variable after delete
http: remove unnecessary delete
lib/PublicInbox/GitHTTPBackend.pm | 2 +-
lib/PublicInbox/HTTP.pm | 6 ++--
lib/PublicInbox/Qspawn.pm | 48 ++++++++++++-------------------
t/qspawn.t | 17 +++++++----
4 files changed, 33 insertions(+), 40 deletions(-)
--
EW
^ permalink raw reply [relevance 5%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2019-09-17 8:31 5% [PATCH 0/6] qspawn-related cleanups, comments, and minor fix Eric Wong
2019-09-17 8:31 7% ` [PATCH 2/6] qspawn: log errors for generic PSGI server users Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).