From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH] spawn_pp: fix incorrect `use'
Date: Thu, 9 Feb 2023 21:53:20 +0000 [thread overview]
Message-ID: <20230209215320.2849889-1-e@80x24.org> (raw)
We can't `use PublicInbox::Spawn' from SpawnPP because
PublicInbox::Spawn loads SpawnPP from BEGIN.
Fixes: 9eb8baf199cd148b (spawn_pp: use `which()' properly for pure-Perl spawn, 2023-01-29)
---
lib/PublicInbox/SpawnPP.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/PublicInbox/SpawnPP.pm b/lib/PublicInbox/SpawnPP.pm
index 73859e9b..5609f74a 100644
--- a/lib/PublicInbox/SpawnPP.pm
+++ b/lib/PublicInbox/SpawnPP.pm
@@ -7,7 +7,7 @@
package PublicInbox::SpawnPP;
use v5.12;
use POSIX qw(dup2 _exit setpgid :signal_h);
-use PublicInbox::Spawn qw(which);
+# this is loaded by PublicInbox::Spawn, so we can't use/require it, here
# Pure Perl implementation for folks that do not use Inline::C
sub pi_fork_exec ($$$$$$$) {
@@ -48,7 +48,7 @@ sub pi_fork_exec ($$$$$$$) {
sigprocmask(SIG_SETMASK, $old) or die "SIG_SETMASK ~CHLD: $!";
$cmd->[0] = $f;
if ($ENV{MOD_PERL}) {
- $f = which('env');
+ $f = PublicInbox::Spawn::which('env');
@$cmd = ('env', '-i', @$env, @$cmd);
} else {
%ENV = map { split(/=/, $_, 2) } @$env;
reply other threads:[~2023-02-09 21:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230209215320.2849889-1-e@80x24.org \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).