unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] spawn_pp: fix incorrect `use'
@ 2023-02-09 21:53 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2023-02-09 21:53 UTC (permalink / raw)
  To: meta

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;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-09 21:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-09 21:53 [PATCH] spawn_pp: fix incorrect `use' Eric Wong

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).