]> git.ipfire.org Git - thirdparty/public-inbox.git/commit
lei: ensure --stdin sets %ENV and $current_lei
authorEric Wong <e@80x24.org>
Thu, 14 Sep 2023 23:10:05 +0000 (23:10 +0000)
committerEric Wong <e@80x24.org>
Fri, 15 Sep 2023 01:24:23 +0000 (01:24 +0000)
commit759885e60e59b5cdcb13c0174e6f6b4a147787f9
tree07449d91abf4035b95ac134f1a90e59fb81c55fc
parenta3eb768e6449f493ebf3540ef4cdf010c32709b9
lei: ensure --stdin sets %ENV and $current_lei

--stdin usage means the current request can be delayed
indefinitely while other requests with different %ENV
come in.  So make sure our warnings and %ENV can match
non-stdin behavior.

This probably fix segfaults during process cleanup on OpenBSD
since _lei_atfork_child use non-localized assignment of
$current_lei.  But it could be another red herring.  Either way,
it's the right thing to do from an environment replication
perspective.
lib/PublicInbox/LeiInspect.pm
lib/PublicInbox/LeiLcat.pm
lib/PublicInbox/LeiQuery.pm