From 9c7737d056f832824812086373a13922dd08a0c5 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 31 Dec 2020 13:51:42 +0000 Subject: spawn: move run_die here from PublicInbox::Import It seems like a more logical place for it, but we'll favor the newly-added xsys_e() in tests for BAIL_OUT use. --- lib/PublicInbox/Import.pm | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'lib/PublicInbox/Import.pm') diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index 60cff9c2..6f387b77 100644 --- a/lib/PublicInbox/Import.pm +++ b/lib/PublicInbox/Import.pm @@ -9,7 +9,7 @@ package PublicInbox::Import; use strict; use parent qw(PublicInbox::Lock); use v5.10.1; -use PublicInbox::Spawn qw(spawn popen_rd); +use PublicInbox::Spawn qw(run_die popen_rd); use PublicInbox::MID qw(mids mid2path); use PublicInbox::Address; use PublicInbox::Smsg; @@ -442,13 +442,6 @@ sub add { $self->{tip} = ":$commit"; } -sub run_die ($;$$) { - my ($cmd, $env, $rdr) = @_; - my $pid = spawn($cmd, $env, $rdr); - waitpid($pid, 0) == $pid or die join(' ', @$cmd) .' did not finish'; - $? == 0 or die join(' ', @$cmd) . " failed: $?\n"; -} - my @INIT_FILES = ('HEAD' => undef, # filled in at runtime 'description' => <