about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-01-21 19:46:19 +0000
committerEric Wong <e@80x24.org>2021-01-22 16:18:01 -0400
commitd035e8d0ec8c7e38ff921fc65e4925644721bb36 (patch)
tree036b503f2d148ef65e74539edd6d55e46da96f0e
parent5c46247509080a4c0d6eb3db56ec62bfab29e76e (diff)
downloadpublic-inbox-d035e8d0ec8c7e38ff921fc65e4925644721bb36.tar.gz
STDERR may actually get closed in ->ipc_atfork_child in
oneshot mode, so ensure we pass in a valid file handle
to avoid warnings ->wq_do.
-rw-r--r--lib/PublicInbox/LEI.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm
index 2cb2bf40..11ea385f 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -334,7 +334,7 @@ sub atfork_parent_wq {
         $self->{env} = $env;
         delete @$ret{qw(-lei_store cfg pgr lxs)}; # keep l2m
         my @io = delete @$ret{0..2};
-        $io[3] = delete($ret->{sock}) // *STDERR{GLOB};
+        $io[3] = delete($ret->{sock}) // $io[2];
         my $l2m = $ret->{l2m};
         if ($l2m && $l2m != $wq) { # $wq == lxs
                 $io[4] = $l2m->{-wq_s1} if $l2m->{-wq_s1};